excel chart names
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft VBA Training and help » EXCEL Chart names

EXCEL Chart names

resolvedResolved · Low Priority · Version 2007

replyReply Wed 25 Jan 2012, 13:57Delegate Roger said...

Roger has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

EXCEL Chart names

I want to manipulate some charts in VBA.
As far as I can tell, EXCEL names the charts "chart1", chart2" etc. If I have several charts in a spreadsheet, how can I find out the number that EXCEL has given it?

Thanks

Roger

For upcoming training course dates see: Pricing & availability

replyReply Fri 27 Jan 2012, 14:00Trainer Anthony said...

RE: EXCEL Chart names

Hi Roger, the quickest way to do this is to select the chart and use:

MsgBox ActiveChart.Name

Think about looping through the collection of charts in a workbook testing for a particular chart name and manipulating accordingly.

Hope this helps,

Anthony

 

Please browse our web site to find out more about
vb for access trainer and other Microsoft training courses.

Vba tip:

Stop Display Alerts In Excel

When creating or deleting a Worksheet in Excel you don't want Excel to inform you "A file already exists....." Or "Do you want to save this file...".

To stop these alerts happening use the following line of code:

Application.DisplayAlerts = False

After the Create or Delete routine use:

Application.DisplayAlerts = True

View all VBA hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard