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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Sub AddText()
Dim shp As Shape
Set shp = ActiveSheet.Shapes("Rectangle 1")
sText = Range("A249").Text
shp.TextFrame.Characters.Text = sText
End Sub
 
Back
Top