PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Charting Can't Find/Replace on charts?

Reply

Can't Find/Replace on charts?

 
Thread Tools Rate Thread
Old 22-09-2003, 05:42 PM   #1
Jamie Martin
Guest
 
Posts: n/a
Default Can't Find/Replace on charts?


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


  Reply With Quote
Old 23-09-2003, 08:59 PM   #2
Jon Peltier
Guest
 
Posts: n/a
Default Re: Can't Find/Replace on charts?

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
>
>


  Reply With Quote
Old 25-09-2003, 07:48 PM   #3
Tushar Mehta
Guest
 
Posts: n/a
Default Re: Can't Find/Replace on charts?

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
>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off