View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Assign a text to a rectangle

Hi Alberto

Since it is an autoshape you need to use code to do that..Try the below.
Place this either in worksheet change event so that the text change will
happen as soon as the text is changed...

Dim sh As Shape
Set sh = ActiveSheet.Shapes("Rectangle 1")
sh.OLEFormat.Object.Text = Range("A1")

If this post helps click Yes
---------------
Jacob Skaria


"Alberto Ast" wrote:

I have a rectangle I made from the drawing tool bar and then I assigned a
macro to it... can I change the text of the rectangle based on the string
stored in a specific cell?