Adding Option Buttons to a User Form

[q] Using the Frame tool, draw a frame to separate the next set of controls from the other con-■—. trols on the userform. The frame is used to group option buttons together, as shown in 0

Figure 9.10.

Figure 9.10

Use a frame to group option buttons together.

Figure 9.10

Use a frame to group option buttons together.

Option buttons have a Group property. If you assign the same group name, Buildings, to a set of option buttons, you force them to act collectively as a toggle, so that only one button in the set can be selected:

For users who prefer to select the option button's label instead of the button itself,such as in Figure 9.11,add code to the label to trigger the option button. Private Sub Lbl_Bldg1_Click() Obtn_Bldg1.Value = True End Sub

0 0

Post a comment