Hi Mully,
My last response was aimed at a single textbox.
To disable / re-enable the three specified textboxes (say TextBox1, TextBox2
and TextBox3) in response to a checkbox (CheckBox1), try:
'==========================>>
Private Sub CheckBox1_Click()
Me.TextBox1.Enabled = Not Me.CheckBox1.Value
Me.TextBox2.Enabled = Not Me.CheckBox1.Value
Me.TextBox3.Enabled = Not Me.CheckBox1.Value
End Sub
'<<==========================
If you additionally want to apply / remove a grey background to the three
textboxes, try instead:
'==========================>>
Private Sub CheckBox1_Click()
With Me.TextBox1 <<========= CHANGE
If Not Me.CheckBox1 Then
.Enabled = True
.BackColor = &H80000005
Else
.Enabled = False
.BackColor = &H80000000
End If
End With
With Me.TextBox2 <<========= CHANGE
If Not Me.CheckBox1 Then
.Enabled = True
.BackColor = &H80000005
Else
.Enabled = False
.BackColor = &H80000000
End If
End With
With Me.TextBox3 <<========= CHANGE
If Not Me.CheckBox1 Then
.Enabled = True
.BackColor = &H80000005
Else
.Enabled = False
.BackColor = &H80000000
End If
End With
End Sub
'==========================>>
Change the textbox names to accord with your needs.