Can I copy cell contents to an autoshape as text using a macro?

S

Syndrome

I want to run a macro in order to copy the contents of a specific cell and
add as text to a specific autoshape already located on a worksheet.
For eg contents of cell A249 = 'Andy'. I want the name 'Andy' to transfer to
the autoshape as the text on the autoshape.
Can anyone provide the code required or know of an easier way?
I'm using Excel within Office 2000.

Thanks
 
T

Tom Ogilvy

Sub AddText()
Dim shp As Shape
Set shp = ActiveSheet.Shapes("Rectangle 1")
sText = Range("A249").Text
shp.TextFrame.Characters.Text = sText
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top