Picture # assignment
On a sheet select all pictures then run this macro.
Public Sub ReNamePics()
Dim Pic As Shape, K As Long
For Each Pic In Selection.ShapeRange
K = K + 1
Pic.Name = "MyPic" & K
Next Pic
End Sub
Or run this is you have a list of names to use.
Sub Rename_Pics22()
'select all pictures then rename with a list starting at A2
Dim Pic As Shape
Dim rng As Range
Dim i As Integer
On Error GoTo endit
Set rng = Range("A2")
For Each Pic In Selection.ShapeRange
Pic.Name = rng.Offset(i, 0).Value
i = i + 1
Next Pic
Exit Sub
endit:
MsgBox "there is a picture by that name, re-type a name"
End Sub
Gord Dibben MS Excel MVP
On Thu, 2 Apr 2009 21:52:04 -0700, danpt
wrote:
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
|