Checkbox

M

Mikeymay

I have a Checkbox within a form and when checked I want a
Textbox to be available to accept some data. How do I do
this while the form is still open and no buttons have been
pressed to accept the data entered.

Also if the Checkbox is unchecked I don't the user to be
able to input data into the textbox and to have it 'greyed-
out'.
 
A

Andy Pope

Hi,

This will enabled and disable the textbox whenever the checkbox is clicked.

Private Sub CheckBox1_Click()
TextBox1.Enabled = Not CheckBox1.Value
End Sub
 
Top