Frame a subset of a group of option buttons

  • I have a frame "Numbering" that allows for 1 of 3 choices (No, Ascending, Descending). Also in the frame is a subframe with an additional 3 options. I'd like to move the 2 options (ascending/descending) into another subframe (Direction), but continue to have the 3 choices grouped. If I move the direction options into the subframe, they no longer interact with the "No" option. All 3 buttons have their groupnames set to the same value. Thanks in advance for any help.

  • Re: Frame a subset of a group of option buttons


    You could control the option buttons with the following code


    Code

    [FONT="Arial Black"][COLOR="blue"][SIZE="4"]Bill[/SIZE][/COLOR][/FONT]
    Tip: To avoid chasing code always use Option Explicit.

  • Re: Frame a subset of a group of option buttons


    Bill


    I could do something like you proposed. Buttons 2 & 3 would only have to reference button1, since they would be already interact with each other (they'd be in the same frame). Button 1 would need to reference both 2 & 3. I was hoping there would be a way to do this that didn't require special coding. I thought that the purpose of the groupname was to enable this type of operation. I'll implement this as a (hopefully) short-time solution and keep looking.


    Thanks for the response.

  • Re: Frame a subset of a group of option buttons


    I'm not sure what you are looking for:


    check ASCENDING results in DECENDING being unchecked
    check DESCENDING result in ASCENDING being unchecked.


    What do you want to happen when NO is Checked?


    Why do you want ASC and DEC in their own Frame? If its is for visual effect only, you can do that with a transparent label that has a border.

  • Re: Frame a subset of a group of option buttons


    Mike and Norie


    I'm trying to visually seperate the No option from the Ascending/Descending options. The No selection influences not only the order, but also a seperate group of options in another frame. If ascending/descending are selected, the no will be de-selected and the other frame will be enabled. So if no is selected, no other options are valid; if either asc/dsc are selected, the user has another set of options available to pick. I'm going to try the transparent label with border to see if that will do what I want. Thanks for the suggestions.

  • Re: Frame a subset of a group of option buttons


    Another option would be to underline the NO. And use this to control the other frame

    Code
    Private Sub optNO_Change()
        Frame1.Visible = optNO.Value
    End Sub
  • Re: Frame a subset of a group of option buttons


    Mike


    I just tried your suggestion of the transparent label with a border. It worked perfectly, but unless there is a property to place the caption into the border; it doesn't visually match the adjacent frame. At this point, consistent look and feel is what I'm striving for. Bill's suggestion of coding in the click events does give me the look and feel, and only requires 4 lines of code.


    I'm not certain that I understand your second suggestion. If you're controlling the frame that holds the asc/dsc options, I don't want that frame to ever be hidden, since the user will be picking whether to include numbering (and the order of the numbers).


    I posed my original question because I thought that I had missed some property that was necessary for the groupname to keep the group of option buttons synched. But it appears that Excel really doesn't pay any attention to it once the buttons get placed into a container object.


    Again, thanks for your help.

  • Re: Frame a subset of a group of option buttons


    I was thinking of underlining the caption of the NO button with the Font.Undeine property. And toggling the visibility of the secondary frame.
    But if you have the visual design set, that won't work.


    Another idea. Two Labels. A transparent one for the border. Another, with small font, to put the caption where you want (by the edge of the first Label). I try to avoid appearance based on going event code. It uses resources and when you need to edit the project, in six months, it makes it harder to figure out what code is doing to what and why.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!