|
-
Mar 27th, 2007, 07:07 AM
#1
Thread Starter
Lively Member
[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
-
Mar 27th, 2007, 07:24 AM
#2
Addicted Member
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
-
Mar 27th, 2007, 07:28 AM
#3
Thread Starter
Lively Member
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.
-
Mar 27th, 2007, 07:51 AM
#4
Thread Starter
Lively Member
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
-
Mar 27th, 2007, 08:28 AM
#5
Addicted Member
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
-
Mar 27th, 2007, 09:31 AM
#6
Thread Starter
Lively Member
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?
-
Mar 27th, 2007, 10:40 AM
#7
Addicted Member
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
-
Mar 27th, 2007, 12:24 PM
#8
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|