-
[RESOLVED] question
just wanted to know what it is called when you can display one field depending on another selection. e.g. if you selected "paid" from a list, it would display a field for you to enter a date. so that i can search for it on google as this is what i need. thanks joe
-
Re: question
on a form or in excel?
on the combo box on a form
Private Sub ComboBox1_Change()
if Combo_box1.text= "paid" then
frame1.visible = true
else if combo_box1.text = "unpaid"
frame2.visible = false
end if
End Sub
-
Re: question
on a form in vba.
so that when i select paid from a listdown box it shows the textbox underneath so that i can put in the date paid.
-
Re: question
should this work then
Private Sub ComboBox2_Change()
If ComboBox2.Text = yes Then
TextBox10.Visible = True
Else
TextBox10.Visible = False
End If
End Sub
at the moment i cant see the extra textbox whatever it says.
thanks joe
-
Re: question
yeah, you need to put " " around yes though
but if its yes, then the text box is visible if anything else its hidden
-
Re: question
i also want to make a label as well as the tetxbox appear/dissapear, how would i do this as i tried using
label1.visible = true/false
but it just stays there all the time.
any ideas?
-
Re: question
you need to set it to false in its properties if you dont want it to show straight away
or you could use userform_initialize
label1.visible = false
-
Re: question