Microsoft Office Tutorials and References
In Depth Information
Understanding Chart Events
This workbook, named events – chart sheet.xlsm , is available on the companion
CD-ROM.
The Chart_Activate procedure follows:
Private Sub Chart_Activate()
Dim msg As String
msg = “Hello “ & Application.UserName & vbCrLf & vbCrLf
msg = msg & “You are now viewing the six-month sales “
msg = msg & “summary for Products 1-3.” & vbCrLf & vbCrLf
msg = msg & _
“Click an item in the chart to find out what it is.”
MsgBox msg, vbInformation, ActiveWorkbook.Name
End Sub
This procedure displays a message whenever the chart is activated. See Figure 18-13.
Figure 18-13: Activating the chart causes Chart_Activate to display this message.
 
Search JabSto ::




Custom Search