LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default check whether shape is a group

Hi all

I'm trying to run the following macro to reset the entries in option buttons
and check boxes.

Sub ResetSelection()

For Each shp In ActiveSheet.Shapes
For Each grp In shp.GroupItems
If TypeOf grp.DrawingObject.Object Is MSforms.OptionButton Or TypeOf
grp.DrawingObject.Object Is MSforms.CheckBox Then
grp.DrawingObject.Object.Value = False
End If
Next grp
Next shp
End Sub

This works fine for the shapes that are grouped objects, however
shp.groupitems gives an error if shp is not a group. What is the correct
syntax to perform a check on shp, e.g. something like: if shp.type =
groupedobject then...

Thanks in advance
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ShemeColor Shape/Group Zurn[_59_] Excel Programming 1 July 24th 06 10:31 AM
Change order in a multi-shape group? Jay Excel Programming 0 April 5th 06 11:43 PM
text in shape group pshen Excel Programming 2 June 8th 05 07:34 PM
Get the name of a group given the reference to a shape within the group Andrew[_16_] Excel Programming 5 January 1st 04 01:08 AM
Reference oleobject within shape group Andrew[_16_] Excel Programming 4 December 24th 03 02:31 AM


All times are GMT +1. The time now is 05:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"