Microsoft Office Tutorials and References
In Depth Information
Using VBA to Activate a Chart
Figure 18-2: Creating a chart on a chart sheet.
Using VBA to Activate a Chart
When a user clicks any area of an embedded chart, the chart is activated. Your VBA code can
activate an embedded chart with the Activate method. Here’s a VBA statement that’s the
equivalent of Ctrl+clicking an embedded chart:
ActiveSheet.ChartObjects(“Chart 1”).Activate
If the chart is on a chart sheet, use a statement like this:
Sheets(“Chart1”).Activate
Alternatively, you can activate a chart by selecting its containing Shape:
ActiveSheet.Shapes(“Chart 1”).Select
 
Search JabSto ::




Custom Search