Hi!
In Worksheet1 I have a lot of shapes, some has same name.
I want to rename all shapes in Worksheet1 to: Picture1, Picture2, Picture3, Picture4, ..... and so on.
Please help.
In Worksheet1 I have a lot of shapes, some has same name.
I want to rename all shapes in Worksheet1 to: Picture1, Picture2, Picture3, Picture4, ..... and so on.
Please help.
HTML:
Function ShapeAtActiveCell() As String
Dim Sh As Shape
For Each Sh In ActiveSheet.Shapes
If Sh.TopLeftCell.Address = ActiveCell.Address Then
ShapeAtActiveCell = Sh.Name
ActiveSheet.Shapes(ShapeAtActiveCell).Select
Exit Function
End If
Next
End Function
'--------------
Sub RenameShapes()
Dim p As String, n As Long
p = "Picture"
n = 1000
For i = 1 To n
With Worksheets("Sheet1")
.Shapes(ShapeAtActiveCell).Name = p + i
End With
Next
End Sub
Last edited: