How to access the full set of attributes for controls in a group?

McAldo

New Member
Joined
Feb 19, 2010
Messages
11
Does anybody know how to access the full set of attributes of a control when grouped?

I am trying to access the properties of a grouped set of checkboxes (for grouped I mean selected and right click - > Group)

It appears that grouped controls are not accessible through OLEObjects() but they can be accessed as shapes. For example, the following code will set all elements in the group Advertisement2 to .Visibility = False:

Code:
For Each T In ActiveSheet.Shapes("Advertisement2").GroupItems
    T.Visible = True
Next

However, most other properties, such as .Enabled or .Value are not accessible (probably because the controls are considered shapes).
I have tried all sort of solutions, including using
.groupItems("ControlName").Value
or
.groupItems("ControlName").Object.Value

But to no avail..

Does anybody have a clue about this and hopefully knows a workaround?


Thanks!

Al
 
No problem.:)

Thanks for the further explanation and sorry for not posting any specific advice.

From the latest post it sounds like you might want to look at dependent lists.

How exactly to implement those would be pretty much dependent on how the data is structured and where it's stored.

That's assuming it is stored somewhere of course.:)
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Thanks Norie!
Dependent lists?
I will have a look into it, probably I am trying and reinvent the wheel when there are already solutions much more efficient of what I might come up with by myself.

In reality, a few people came out with a solution for the original problem of setting values for grouped controls.
http://www.mrexcel.com/forum/showthread.php?t=449658
This is really good to know for the future, however I might go with your advice and redesign the thing so to avoid grouping and further headache.

Thanks again :)

Aldo
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top