Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
excel chart names

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

EXCEL Chart names

ResolvedVersion 2007

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

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

VBA tip:

Stop Screen Flickering When Running Code

Running VBA code may cause the screen to flicker as the monitor is the slowest part of the program and cannot keep up with the very fast changes taking place.

To switch off the screen until the program is run enter the following code line:

Application.ScreenUpdating = False

The screen comes on automatically on completion of the program.

View all VBA hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.