Excel VBA - Deleting objects from sheet triggers run-time error
问题 I am getting this run-time error "The index into the specified collection is out of bounds." The goal is to remove all objects from my worksheet. I was using the code below for quite some time and it worked fine before it suddenly started triggering the error. Dim obj As Shape For Each obj In .Shapes obj.Delete Next obj I did research online and found that looping backwards seemed to solve the problem for most people. 'Delete all objects on sheet For i = ThisWorkbook.Sheets("Req Raw").Shapes