How to show/hide sections of a userform?

  • Thread starter Thread starter madbloke
  • Start date Start date
M

madbloke

How would I go about doing this (if it's even possible)?

For example, if someone checks a checkbox on my form, I want a textbo
to appear underneath for more info
 
You can make a userform that has a height of 100 for example. Then either
in design mode or the initialize event, set the height to 50 (as an
example). Before doing that, put your textbox beyond 50. Now, in the click
event of the checkbox adjust the height of the userform

if Checkbox1 then
userform1.Height = 100
else
userform1.Height = 50
End if
 
Everything on a userform has a Visible property. To show
a textbox when a check box is ticked, use:

Private Sub CheckBox1_Click()

CommandButton1.Visible = CheckBox1.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