PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
How to show Excel chart VBA 'name'?
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
How to show Excel chart VBA 'name'?
![]() |
How to show Excel chart VBA 'name'? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi, I have several charts on every Excel Worksheet. I'd like to program VB to select them. In order to do so, I need to know the 'name' of eac chart. How to display it quickly? Maybe you know a kind of add-in that has a kind of nutton like 'sho chart name'? Thanks, Micha ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi Michal,
Just hold the Shift key before selecting the chart. The name will be displayed in the Name Box (where the cell address is normally displayed) mbobro wrote: > Hi, > > I have several charts on every Excel Worksheet. I'd like to program VBA > to select them. In order to do so, I need to know the 'name' of each > chart. > > How to display it quickly? > > Maybe you know a kind of add-in that has a kind of nutton like 'show > chart name'? > > Thanks, > > > Michal > > > ------------------------------------------------ > ~~ Message posted from http://www.ExcelTip.com/ > ~~View and post usenet messages directly from http://www.ExcelForum.com/ > -- Cheers Andy http://www.andypope.info |
|
|
|
#3 |
|
Guest
Posts: n/a
|
You might not even need the names.
To loop through the charts one by one, use a construction like this: Dim oChtOb as ChartObject For Each oChtOb in ActiveSheet.ChartObjects ' Do your stuff to oChtOb or to its chart, oChtOb.Chart Next To select all charts, use: ActiveSheet.ChartObjects.Select In general, you don't even need to select a chart to change it. Just refer to the part that needs adjusting: oChtOb.Chart.Axes(2,1).MaximumScale = 100 When using recorded macros, everywhere you see this: SomeObject.Select Selection.DoSomething you can streamline things with this: SomeObject.DoSomething - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ mbobro wrote: > Hi, > > I have several charts on every Excel Worksheet. I'd like to program VBA > to select them. In order to do so, I need to know the 'name' of each > chart. > > How to display it quickly? > > Maybe you know a kind of add-in that has a kind of nutton like 'show > chart name'? > > Thanks, > > > Michal > > > ------------------------------------------------ > ~~ Message posted from http://www.ExcelTip.com/ > ~~View and post usenet messages directly from http://www.ExcelForum.com/ > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

