Reputation: 11
When creating a shape in excel an automatic name is generated eg "Click Box 213". This would be the 213th shape created. My shapes are created by a macro copying lines in an excel sheet. How to identify the last shape created so I can perform operating on it?
Upvotes: 1
Views: 151
Reputation: 17627
Use the .Count
property on the Shapes
collection
Set lastShape = ActiveSheet.Shapes(ActiveSheet.Shapes.Count))
Upvotes: 1