View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jamie Martin[_2_] Jamie Martin[_2_] is offline
external usenet poster
 
Posts: 25
Default refined question

I figured out how to change the text in a chart shape. However, my procedure
fails if there are any shapes on my chart that do not have any text. I tried
several ways around this, but they all gave me a runtime error. Here's an
example:

For Each Shp In Cht.Shapes
If (Shp.TextFrame.Characters.Text < "") Then
Shp.TextFrame.Characters.Text = _
WorksheetFunction.Substitute _
(Shp.TextFrame.Characters.Text, Str1, Str2)
End If
Next Shp

I also tried "If(Shp.TextFrame Is Nothing) Then"

Can someone help? Thanks very much.

Jamie