Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Name a Chart Object on a Worksheet

Excel How To

Name a Chart Object on a Worksheet

by  MeGustaXL  Posted    (Edited  )
If you want to refer to a ChartObject on a Worksheet in your VBA Macros, it helps if you give it a more meaningful name than "Chart1", which is the typical default name.

To Name a ChartObject, do this:

1. Select any cell on the Worksheet containing the chart. (This deselects the ChartArea).
2. Hold down Ctrl and click the Chart - its handles will appear as white squares.
3. Click in the Names box and type the name you require, e.g. "SalesForThisMonth".
4. Press Enter.

The ChartObject is now known as "SalesForThisMonth", and you can reference it in VBA.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top