Microsoft Office Tutorials and References
In Depth Information
USING THE MOUSEDOWN EVENT
T ABLE 16-1 EVENTS RECOGNIZED BY THE CHART OBJECT (Continued)
Event
Action that triggers the event
A range of cells is dragged over the chart.
DragOver
A range of cells is dragged and dropped onto the chart.
DragPlot
A mouse button is pressed while the mouse pointer is over
the chart.
MouseDown
The position of the mouse pointer changes over the chart.
MouseMove
A mouse button is released while the pointer is over the chart.
MouseUp
The chart is resized. For a Chart sheet, this event is triggered
only when the Sized with Window option is in effect.
Resize
A chart element is selected.
Select
The value of a chart data point is changed by dragging
the point.
SeriesChange
Chart event procedures must reside in the code module for the Chart sheet
(for example, Chart1). To use Chart event procedures with embedded charts,
see the sidebar,“ Enabling events for an embedded chart.”
USING THE MOUSEDOWN EVENT
The MouseDown event occurs when a chart element is clicked. There’s also a MouseUp
event, which occurs when the user releases the mouse button. Therefore, a single
mouse click generates two events. This example focuses on the MouseDown event.
Figure 16-19 shows a chart with three data points in a single series. The goal is
to make the chart serve as a clickable menu: Click a column and the corresponding
worksheet is activated. For example, when the user clicks the South column in the
chart, the worksheet named South will be activated.
Search JabSto ::




Custom Search