Use the CheckBox control to determine if an item is selected (see Figure 3-18). If the box is unchecked, then the item isn't selected. If the box is checked, then the user has selected that item. You may have any number of CheckBox controls on a UserForm; each CheckBox control's checked state is independent of any other CheckBox control.
The following example uses the Click event of the CheckBox control to determine the current state of the control:
Private Sub CheckBox1_Click() If CheckBox1.Value Then MsgBox "Checked"
MsgBox "Unchecked" End If End Sub
Was this article helpful?