ksor
10-26-2022, 11:26 AM
I have a sheet with some rectangles, arrows and triangles.
Each rectangle has a number as it's Name and when I want to add new rectangles I need to find the biggest 'number' Name and count further from there.
This code run through the shapes and can find out the types - but can it be done WITHOUT selecting the shape:
Sub IdentifyShapes()
Dim s As Shape
For Each s In ActiveSheet.Shapes
s.Select
Debug.Print s.Type, TypeName(Selection)
Next s
End Sub
Each rectangle has a number as it's Name and when I want to add new rectangles I need to find the biggest 'number' Name and count further from there.
This code run through the shapes and can find out the types - but can it be done WITHOUT selecting the shape:
Sub IdentifyShapes()
Dim s As Shape
For Each s In ActiveSheet.Shapes
s.Select
Debug.Print s.Type, TypeName(Selection)
Next s
End Sub