Enabling a textbox

  • Thread starter Thread starter K1KKKA
  • Start date Start date
K

K1KKKA

Hi all,

HYCH.


More a question than a problem,


I have a textbox (Textbox1) in a form, beside it i have a checkbox, is
it possible to have the textbox disabled unless the checkbox is
clicked, if it is, how is this accomplished?



Steve
 
hi
something like this should do....
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
TextBox1.Enabled = False
Else
TextBox1.Enabled = True
End If
End Sub
regards
FSt1
 
hi
something like this should do....
Private Sub CheckBox1_Click()
If CheckBox1 = True Then
TextBox1.Enabled = False
Else
TextBox1.Enabled = True
End If
End Sub
regards
FSt1







- Show quoted text -

Thanks, was playing with the following,


Private Sub UserForm_Click()
If CheckBox1.Value = True Then
TextBox1.Enabled = True
Else
If CheckBox1.Value = False Then
TextBox1.Enabled = False
End If
End If
End Sub


Made it work too, long though in comparison

Many thanks


Steve
 
Back
Top