How to ungroup a set of controls?
I'm trying to figure out how to ungroup a set of controls that reside on a
worksheet.
Basically I'm starting with an object reference to one of the controls
(e.g., a textbox) in the group. I thought I could do something like:
myTextbox.ShapeRange.Ungroup
but that just causes a runtime error (1004).
I've also tried:
myTextbox.Select
Selection.ShapeRange.Ungroup
and that seems to work sometimes but the results are a bit unpredictable.
Also is there a way to figure out if a control (e.g., myTextbox) is part of
a "user defined" group? It seems like some of Excel's control's (e.g., a
ComboBox) are built up from other more basic controls and then grouped. I
don't want my code to ever ungroup a ComboBox into its constituent objects.
TIA,
josh
|