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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change title of a graph in excel

Status
Not open for further replies.

terzaghi

Programmer
Aug 25, 2003
49
IT
Hi.

I need to change every month the title of a 25 different graph. Totday the title of the graph is "October" I have to change all the titles in "November"
a simple code is:

Sub Macro1()
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.ChartTitle.Select
Selection.Characters.Text = "November"
End Sub


does anyone have a code to cycle among the graphs and change the title of them without knowing that every single graph's name. Infact usually We delete and create new graphs and we really don't know if the name of the graph od "Chart 1" or "Chart 234".

Thanks
 
Hi,

select a cell for you title

=TODAY()

format the cell custom mmmm

select the chart title

in the formula bar enter =

then select the cell that contains the title.

Don't have to change or run anything each month!



Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
I tryed that but with Microsoft Excel 2000 ver. 9.0.2812 it doesn't work..
which version do you have?

Thanks a lot!
 
'97

Skip,
[sub]
[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue][/sub]
 
Food for thought...

I almost NEVER use an "embedded" title in Excel's graphs.

Instead, I have my code change a cell or cells at the top of the sheet, with the graph tucked under the heading row(s).

I find this affords much more flexibility, and automation.

Hope this helps. :)

Regards, Dale Watson

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top