View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Picture # assignment

You didn't do what I said to do... run the single line of code I posted in
the Immediate window. I think you had a problem because you tried to make it
a macro... the Print statement has no meaning in a macro. If you want to
keep it as a macro, change the keyword Print to Debug.Print

--
Rick (MVP - Excel)


"danpt" wrote in message
...
Hi, Rick
Glad to hear you again.

Sub PictureList()
For Each S In Sheet1.Shapes: Print S.Name: Next
End Sub

I got a
Compile error: Mathod not valid without suitable object
I'm new to this. Please refine it.


"Rick Rothstein" wrote:

You can run this line of code in the Immediate window of the Visual Basic
editor and it will list the names of all shapes on the specified sheet...

For Each S In Sheet1.Shapes : ? S.Name : Next

--
Rick (MVP - Excel)


"danpt" wrote in message
...

My book has many pictures.
Picture #s kept going higher and higher every time I made a change to
the
book and the #s were skipping.
Is there a way to get a list of the Picture #s in the book.
I want to rename all the Pictures to a low # start and more
consecutive.
Thanks