Article ID: 161858
Article Last Modified on 11/23/2006
A1: 1
A2: 2
A3: 3
Public WithEvents EmbChart As Chart
The WithEvents keyword makes the EmbChart variable available
in the Object list in the Class1 (Code) module window.
Private Sub EmbChart_Activate()
End Sub
NOTE: The Activate event is the default event for the object.
Private Sub EmbChart_Resize()
End Sub
Private Sub EmbChart_Resize()
MsgBox "You are resizing the " & EmbChart.Name & " chart."
End Sub
Dim mychart As New Class1
Sub Set_Chart()
Set mychart.EmbChart = Sheet1.ChartObjects(1).Chart
End Sub
You are resizing the Sheet1 Chart 1 chart.
Sub Reset_Chart()
Set mychart.EmbChart = Nothing
End Sub
158244 XL97: How to Create Application Level Event Handlers
class module
Additional query words: 97 XL97
Keywords: kbdtacode kbprogramming KB161858