[RESOLVED] how to enable/disable text box based on radio button value?
Hi i have 2 radio buttons,
i) default value
ii) specify value
and 3 textboxes
i)width
ii)height
iii)size
the 3 texboxes are placed within a frame
Now if the user chooses default value, i wan to gray out the 3 texboxes and disable them. However, when the user selects specify value, onli then will i enable the 3 textboxes. It can be done using IF THEN statements, however, which SUB should i place my statements in?
Re: how to enable/disable text box based on radio button value?
thks but i got the answer already
just put the statements in the radio button 's click SUB will do..
thks
Re: how to enable/disable text box based on radio button value?
VB Code:
Option Explicit
Private Sub Option1_Click()
If Option1.Value = True Then
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
End If
End Sub
:)
Re: [RESOLVED] how to enable/disable text box based on radio button value?
I know it is very very old thread but i am looking the similar solution but i want to hide instead of enable/disable, how can i hide the textbox and label.. Please help?
Re: [RESOLVED] how to enable/disable text box based on radio button value?
Set the visible property instead of the enabled property.