Hello again!
Have a somewhat specific problem here - Say I have done certain actions and grouped together two objects - one is the base shape and the other is the result of macros actions, named, say "ResultShape".
If I then simply want to remove the ResultShape it's as easy as
Code:
ActiveSelectionRange.Shapes.FindShapes("ResultShape").Delete
After this is done the active selection jumps to the remaining shapes in the group (the base shapes) and the group object gets dissolved AFAIU. Now this is where the problems come in - if I need to work on a range of shapes, some of them being groups which need the removal of the "ResultShape", others being plain shapes which need to be processed. A problem occurs if I do something like:
Code:
ChangeRange.AddRange ActiveSelectionRange
ChangeRange.Shapes.FindShapes("ResultShape").Delete
For Each CurrentShape In ChangeRange
' Do something with the CurrentShape and an
' error occurs stating that the referenced shape (the group, I guess)
' no longer exists
The group is also named, say "ResultShapeGroup", but if I try to remove that from the selection then the base shapes which need processing also get removed.
Any ideas?