+ Reply to Thread
Results 1 to 2 of 2

Grouping Userform Controls

  1. #1
    ExcelMonkey
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1