View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MSweetG222 MSweetG222 is offline
external usenet poster
 
Posts: 158
Default Picture #s Assigned to Objects

The basic code to rename a picture/shape is:

ActiveSheet.Shapes("Picture 123").Name = "MyNewName"

If the code you used in your message box is giving you the actual picture
name, then store the name in a memory variable (ie: rather than Msgbox use
MyShapeName = ). Then your line of code would be:

ActiveSheet.Shapes(MyShapeName).Name = "MyNewName"

Replace "MyNewName" with whatever naming convention you wish to use.

--
Thx
MSweetG222



"VicWestVan" wrote:

When I insert a graphic object, it is automatically assigned a number i.e.
"Picture 123".

<Msgbox Application.Caller.Name displays this auto assigned number.

Is there anyway to set or change the number assigned to such objects?