Hey guys,
I want an combox that's enabled when you hit the optionbutton next to it, does anyone know a code for that? Thanks :-)
Printable View
Hey guys,
I want an combox that's enabled when you hit the optionbutton next to it, does anyone know a code for that? Thanks :-)
use the click event of the optionbutton to enable the combobox next to itQuote:
Originally Posted by Ermen
I don't know how that's the problem :$
you need a Checkbox for that purpose because if you have only one option button then you cannot disable the combo again. try this:
if you still want to use an option button, and you only have Option button and the combobox on your form, then put the option button within another container like PictureBox or Frame and in the above mentioned code, replace Check with Option.VB Code:
Private Sub Form_Load() Combo1.Enabled = False End Sub Private Sub Check1_Click() If Check1.Value Then Combo1.Enabled = True Else Combo1.Enabled = False End If End Sub
Harsh Gupta.
Private Sub Option1_Click()
Combo1.Enabled = True
End Sub
Also you would need to disable it if the user presses another optbutton
Private Sub Option2_Click()
Combo1.Enabled = False
End Sub
Harsh
Can't your code be simplifed to the following?
VB Code:
Private Sub Check1_Click() Combo1.Enabled = Check1.Value End Sub
Thanks, the last post works.. :)
:slaps forhead: knew doing something extra.Quote:
Originally Posted by DKenny
thank you