View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to modify contents of TextFrame?

your code worked fine for me. Perhaps your shape doesn't support text.

--
Regards,
Tom Ogilvy

Robert Stober wrote in message
...
Hi,

I've got a shape that has an asscoiated TextFrame that contains some text.
I'd like to replace that text using VBA code. But I can't get it to work.
based on the oputput of the macro recorder, this should work:

With Sheets("Start").Shapes(7).TextFrame
.Characters.Text = "AAAAA"
End With

But it doesn't. I've also tried to use delete and insert methods of the
characters class, but these methods seem to belong to a different

charaters
class than the one provided by the Shape.TextFrame object.

Does anyone know how to do this?

Thank you very much,

Robert Stober