Reputation: 3254
I have the following sub which is supposed to loop through all the shapes in a sheet and do something:
Private Sub plasser_knappar(ws As Worksheet)
Dim sh As Shape
For Each sh In ws.Shapes
Debug.Print "Do stuff"
Next sh
End Sub
However, on one of my sheets I get an error when the code reaches the line For Each sh in ws.Shapes
- "Run-time error '-2147352567 (80020009) The index into the specified collection is out of bounds". This error does not happen in other worksheets in the workbook. Can anyone shed some light on what might be the problem here?
Upvotes: 1
Views: 653