How can I loop to find the grouped shapes count

  • Thread starter Thread starter David Cuthill
  • Start date Start date
D

David Cuthill

I am trying to figure out a way of counting the number of grouped
shapes on a worksheet but I can't seem to capture the information. I
thought I could use something like ...

PictCount = ActiveSheet.GroupShapes.Count

but I am having no luck.
 
This will count the groups of shapes.

Sub Counter()
Dim i As Integer
i = 0
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.Type = msoGroup Then
i = i + 1
End If
Next
MsgBox i
End Sub

That was fun figuring out. Heh

HTH.

-Brad
 
Brad:

Thank you very much for the help. So I assume it's not
possible to do something like activesheet.pictures.count
for grouped shapes.

David
 
There might be - but I couldn't find it.
-----Original Message-----
Brad:

Thank you very much for the help. So I assume it's not
possible to do something like activesheet.pictures.count
for grouped shapes.

David
.
 
Back
Top