Hi all,
I have this piece of code to rename an object, but it doesn't seem to be working... Can anyone spot what's wrong?
All help greatly appreciated as always!
Regards,
Philippe
Code:Public Sub ReName()
Dim o As Shape, s As String
Set o = ActiveWindow.Selection.ShapeRange(1)
s = InputBox("Enter the new name", "Rename '" & o.Name & "'", o.Name)
On Error Resume Next
If s <> "" Then o.Name = s
If Err.Number <> 0 Then MsgBox "Cannot rename object"
End Sub