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
Bookmarks