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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top