View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Homey Homey is offline
external usenet poster
 
Posts: 143
Default Test for Shape is part of a group?

maybe-

if group shape.type = msogroup

or

if group then shape.GroupItems.Count 0 (or not error)

"Brett" wrote in message
...
|I can't seem to find the syntax for testing whether a shape is PART of a
| group or whether it's the whole group itself (I want to BringToFront if
it's
| not part of a group, but I still want to bring the whole Group to the
front).
| I have (but want to get rid of the error trapping to make it more
flexible):
|
| Dim sh As Shape
| On Error Resume Next
| sh.Select
| With Selection
| .ZOrder msoBringToFront
| While .ZOrderPosition Cells(rw, cl + 6).Value
| .ZOrder msoSendBackward
| Wend
| End With
| On Error GoTo 0
|
| Thanks, Brett