Frustrating objectcollection problem... Items going missing

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I've been working on a macro for quite a while now, and I'm REALLY close to completion. However I've just struck a problem I haven't seen before, and I'm struggling to understand.
To explain the macro very simply, it scans the activesheet in a drawing and generates a Collection Containing a list of LeaderNotes and Balloons, it then proceeds to replace all of them with the same LeaderNote/Balloon but on a different style. (I'm aware you can just change the style, but that's not the point). The way it works is for each item in the Collection it adds a new leader, and deletes the old one.
Problem is that when it deletes the old one, the corresponding entry from the Collection is also made invalid (It's still there, but all the values are "Application-defined or object-defined error"). I could live with this if it only corrupted the single corresponding value, however its corrupting 1 or 2 subsequent items in the object collection too.
I thought maybe I could Insert all the new leaders, then delete them all, but the same problem occurs when it goes back to delete everything.
Does anyone have any suggestions????? I'm at my wits end