How can I loop to find the grouped shapes count
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. |
How can I loop to find the grouped shapes count
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 -----Original Message----- 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. . |
How can I loop to find the grouped shapes count
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 -----Original Message----- 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 -----Original Message----- 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. . . |
How can I loop to find the grouped shapes count
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 -----Original Message----- 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 -----Original Message----- 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. . . . |
All times are GMT +1. The time now is 03:11 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com