listbox option in form

  • Thread starter Thread starter inquirer
  • Start date Start date
I

inquirer

I have a form in excel vb which has a listbox with alternatives option1 and
option2.
Option1 is the default. If option2 is selected I would like to put up a
additional textbox and label on the same form asking for further
information via the textbox. (This textbox and label should not appear when
the form is first opened.)

Is it possible to do this? If so how?

TIA
Chris
 
Place the text box on the form and set its visible property to false.
In the option button's change event set the text box visible property to the
value of the option

Private Sub OptionButton2_Change()
TextBox1.Visible = OptionButton2.Value
Label1.Visible= OptionButton2.Value
End Sub
 
Thanks Patrick, that's what I needed
Chris

Patrick Molloy said:
Place the text box on the form and set its visible property to false.
In the option button's change event set the text box visible property to the
value of the option

Private Sub OptionButton2_Change()
TextBox1.Visible = OptionButton2.Value
Label1.Visible= OptionButton2.Value
End Sub
 
Back
Top