C
Chuck
I've got some checkboxes on a user form that check/uncheck and
enable/unenable depending on each other's values.
Trouble is, in the following code the .chkAndByPost.Value won't change to
false even though the conditions are met for it to do so and the following
line of code (.chkAndByPost.Enabled = False) runs correctly.
Can anyone tell my why my code won't change .chkAndByPost.Value to False in
the following code? Many many thanks for any feedback...
Sub tickIsToFax()
With objForm
.txtToFaxNumber.Enabled = .chkIsToFax.Value
If .chkIsToFax.Value = True Then
.chkAndByPost.Enabled = True
.txtToFaxNumber.BackColor = RGB(256, 256, 256) 'white
.txtToFaxNumber.SetFocus
Else
Select Case .chkIsToEmail.Value
Case True
.chkAndByPost.Enabled = True
Case False
' Even though this code runs,
' the value won't change to False
.chkAndByPost.Value = False
.chkAndByPost.Enabled = False
End Select
.txtToFaxNumber.BackColor = RGB(192, 192, 192) 'grey
End If
End With
End Sub
enable/unenable depending on each other's values.
Trouble is, in the following code the .chkAndByPost.Value won't change to
false even though the conditions are met for it to do so and the following
line of code (.chkAndByPost.Enabled = False) runs correctly.
Can anyone tell my why my code won't change .chkAndByPost.Value to False in
the following code? Many many thanks for any feedback...
Sub tickIsToFax()
With objForm
.txtToFaxNumber.Enabled = .chkIsToFax.Value
If .chkIsToFax.Value = True Then
.chkAndByPost.Enabled = True
.txtToFaxNumber.BackColor = RGB(256, 256, 256) 'white
.txtToFaxNumber.SetFocus
Else
Select Case .chkIsToEmail.Value
Case True
.chkAndByPost.Enabled = True
Case False
' Even though this code runs,
' the value won't change to False
.chkAndByPost.Value = False
.chkAndByPost.Enabled = False
End Select
.txtToFaxNumber.BackColor = RGB(192, 192, 192) 'grey
End If
End With
End Sub