Following the code I found here, I'm trying to count the number of shapes in a worksheet, but I'm getting an 'overflow' error. The code I'm using is as follows:
Sub tst()
Dim i As Integer
i = Sheets("DB_AL").Shapes.count
MsgBox i
End Sub
The problem, I think is the number of shapes that there are in the worksheet.
I'm not sure how I can delete them either. I tried also deleting the shapes with the code I found here:
Sub delShapes()
Dim shape As Excel.shape
For Each shape In Sheets("DB_AL").Shapes
shape.Delete
Next
End Sub
But I'm getting also an 'out of range' error.
At this stage, I'm more interested on deleting the shapes as it is making the worksheet un-usable.
Any ideas?