display hidden controls once check box activated

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want users to answer a yes no question and if they choose yes the following
controls that are on my form (but not visible) to appear. So the sequence
would be:
when click button
display ListBox4,Label12,CommandButton10, CommandButton11

Any quick solutions?
 
On the Click event of the button, place something like this for each
item you want to display.
Me.ListBix4.Visible = True

You might want to do a check so that clicking the button when they are
not visible will make them visible. Clicking them when they are
visible will make then invisible.
If Me.ListBox4.Visible = True Then
Me.Listbox4.Visible = False
Me.Label12.Visible = False
Me.CommandButton10.Visible = False
Me.CommandButton11.Visible = False
Else
Me.Listbox4.Visible = True
Me.Label12.Visible = True
Me.CommandButton10.Visible = True
Me.CommandButton11.Visible = True
End If
 
Private Sub commandbutton1_Click()
me.ListBox4.Visible = True
me.,Label12.Visible = True
me.CommandButton10.visible = True
Me.CommandButton11.visible = true
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