MrRajKumar
Active Member
- Joined
- Jan 29, 2008
- Messages
- 291
- Office Version
- 365
- Platform
- Windows
Hello,
I have a checkbox in an userform named as chkList. If it is checked, 3 other controls will be disabled, so the users wouldn't need to fill those fields. If not, I have ensure the users filled those fields. here is I have tried, but doesn't work.
Cotrols:
txtYear - text box
cboMonth: combo box
cboDay: combo box
With this I got runtime error: 2110 (Can't focus to the control because it is invisible, not enabled...)
it is disabled, because chkList is checked TRUE. I want to bypass this section, if it is checked.
I have a checkbox in an userform named as chkList. If it is checked, 3 other controls will be disabled, so the users wouldn't need to fill those fields. If not, I have ensure the users filled those fields. here is I have tried, but doesn't work.
Cotrols:
txtYear - text box
cboMonth: combo box
cboDay: combo box
Code:
If Me.chkList.Value = False And Me.txtYear & "" = "" Then
Me.lblErrYear.Caption = "Required"
Me.txtYear.SetFocus
Exit Sub
End If
With this I got runtime error: 2110 (Can't focus to the control because it is invisible, not enabled...)
it is disabled, because chkList is checked TRUE. I want to bypass this section, if it is checked.