User Form

  • Thread starter Thread starter krc547
  • Start date Start date
K

krc547

I need a user form that allows a user to select a check box and according to
which one they select only select item are visible on the form.
 
Hi,

- On the userform, add a checkbox, say CheckBox1.
- Now put all the controls that should show/hide based on checkbox1 on a
Frame, say Frame1
- in the userform code module, insert the code:

Private Sub CheckBox1_Click()
Frame1.Visible = CheckBox1.Value
End Sub

Checking or unchecking checkbox1 makes the Frame1 (and all controls on that
frame) show or hide.

To add another checkbox, follow the same process replacing CheckBox1 by
Checkbox2, Frame1 by Frame2 and same in the code:
Private Sub CheckBox2_Click()
Frame2.Visible = CheckBox2.Value
End Sub

....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top