Quote Originally Posted by Andy Pope View Post
If all items are required in order to group them then you can condense you code to

    On Error GoTo ERR_DOESNTEXIST
    grouped(2) = opa.ActivePresentation.Slides(activeslide).Shapes("star" & i).Name
    grouped(3) = opa.ActivePresentation.Slides(activeslide).Shapes("top" & i).Name
    grouped(4) = opa.ActivePresentation.Slides(activeslide).Shapes("picture" & i).Name
    ' group items

' code to group items
    
ERR_DOESNTEXIST:
    Exit Sub
Thank you, though not all are required. Just need to have 2 elements for grouping.

The meaning of this grouping is that if user has to modify the presentation by hand a bit, it's easier to move the groups of objects which belong together, than all objects separately.

So if there's no extra objects at all, I skip the grouping all together ( There is always the 'boxframe' That's where all are 'attached')

I'm sure there's million better ways to code this than mine and I'm always writing quite bloated code. But no-one else is reading this but me

Thanks anyway.