Autoshapes name change macro

L

Larry

I have a worksheet containing two autoshapes (rounded
rectangle) allowing the
user to activate or deactivate a macro by clicking on an
autoshape.
Sub TurnOff macro is assigned to rounded rectangle with
inserted text of "DATA Mode". Sub TurnOn macro is assigned to rounded
rectangle
with inserted text of "POSTER Mode". This code will alternately change the
background color of rounded rectangles, allowing the user to know which mode
is activated. e.g. if DATA Mode is activated, DATA mode rounded rectangle
will turn green, POSTER Mode rectangle will have no fill visible, and vice-
versa. To make the code work correctly, I need to change the "AutoShape 1/2"
in the code to match the actual names of the objects the macros are
assigned to. So far, changing the names to 'DATA Mode', 'POSTER Mode'
'rounded
rectangle', or 'rounded rectangle 1/2' have not worked. I continue to
receive the error message "The item with the specified name wasn't found".
I would appreciate any suggestions.
 
D

Don Guillett

I'm not sure this is what you want. I use to change the displayed TEXT on
the shape from a list such as.
Rectangle 1
Rectangle 2
Rectangle 3


Sub NameShapes()
Sheets("mysheet").Select
For Each c In [setup!a4:a14]
ActiveSheet.Shapes(c).Select
'Selection.Characters.Text = "namedesired" & Chr(10) & ""
Selection.Characters.Text = c.Offset(0, 1)
Next
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