PC Review
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Can't Find/Replace on charts?
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Charting
Can't Find/Replace on charts?
![]() |
Can't Find/Replace on charts? |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I have decided that in my chart titles, "Fall" should always be capitalized.
I have a group of 20 or 30 charts I need to standardize. I was going to try to write some VBA code to do this, and I started by turning on the Macro Recorder and doing Find/Replace. But Find/Replace is greyed out when I'm on a chart sheet. What gives? Is there a way to do a Find/Replace anyway with VBA? (Perhaps I should ask the VBA newsgroup?) Thanks for your help, Jamie |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Jamie -
You could use a procedure like this: Sub ChangeChartTitles() Dim Cht as Chart Dim Str1 as String Dim Str2 as String Str1 = "fall" Str2 = "Fall" For Each Cht in ActiveWorkbook.Charts Cht.ChartTitle.Text = _ WorksheetFunction.Substitute(Cht.ChartTitle.Text, Str1, Str2) Next End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Jamie Martin wrote: > I have decided that in my chart titles, "Fall" should always be capitalized. > I have a group of 20 or 30 charts I need to standardize. I was going to try > to write some VBA code to do this, and I started by turning on the Macro > Recorder and doing Find/Replace. But Find/Replace is greyed out when I'm on > a chart sheet. What gives? Is there a way to do a Find/Replace anyway with > VBA? (Perhaps I should ask the VBA newsgroup?) > > Thanks for your help, > > Jamie > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
I imagine it should be possible to write a VBA macro to do a replace
for chart entities. However, a general purpose utility would have to have a rather extensive capability set and very limited application. Since you have what appears to be a one-time requirement, it should be a lot faster to do it by hand. -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <uy9LFiSgDHA.2236@TK2MSFTNGP12.phx.gbl>, lionsmouth2002 @yahoo.com says... > I have decided that in my chart titles, "Fall" should always be capitalized. > I have a group of 20 or 30 charts I need to standardize. I was going to try > to write some VBA code to do this, and I started by turning on the Macro > Recorder and doing Find/Replace. But Find/Replace is greyed out when I'm on > a chart sheet. What gives? Is there a way to do a Find/Replace anyway with > VBA? (Perhaps I should ask the VBA newsgroup?) > > Thanks for your help, > > Jamie > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

