Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Grouping Userform Controls

Is is possible to group controls and then adjust them as a
group. Say for example I have 5 option boxes. If I
wanted to make them all =TRUE. Could I do this by
grouping the entire group = TRUE?

I know I can put them all in a frame and refer to the
frame. Will this allow me to do what I want. Can this be
done without using a frame?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Grouping Userform Controls

If you are using optionbuttons, then you should use the groupname property
to group them. However, there is no collection or other structure that
allows to deal only with that group or to manipulate them as a group. A
frame would have the same effect, but again, just reduces the number of
controls to be considered.

for each ctrl in Frame1.Controls
if typeof ctrl is MSforms.OptionButton
ctrl.Value = false
end if
Next


for each ctrl in UserForm1.Controls
if typeof ctrl is MSforms.OptionButton
if ctrl.GroupName = "Grp1" then
ctrl.Value = false
end if
end if
Next
setting all optionbuttons to True inconsistent with the way optionbuttons
operate. If you wanted to set them all to true, you would have to assign
them each a different groupname and not use frames.


"ExcelMonkey" wrote in message
...
Is is possible to group controls and then adjust them as a
group. Say for example I have 5 option boxes. If I
wanted to make them all =TRUE. Could I do this by
grouping the entire group = TRUE?

I know I can put them all in a frame and refer to the
frame. Will this allow me to do what I want. Can this be
done without using a frame?

Thanks




Reply
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
grouping Radio Buttons; Using ActiveX Controls ryguy7272 Excel Discussion (Misc queries) 2 May 6th 10 06:01 PM
How to unprotect Grouping controls Bob Laithwaite Excel Worksheet Functions 1 May 18th 05 01:32 AM
Userform Controls Nigel Excel Programming 5 December 30th 04 01:49 PM
Help please with UserForm controls sa3214 Excel Programming 4 July 2nd 04 03:00 AM
Add controls to UserForm Vyyk Drago Excel Programming 3 August 26th 03 01:22 PM


All times are GMT +1. The time now is 06:31 PM.

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

About Us

"It's about Microsoft Excel"