I have several checkboxes, in each of them I want to call a sub that will uncheck the checkbox if some condition. Is there a code to reference active checkbox without explicitly referencing its name?
Something like
Code:
Me.ActiveCheckbox = False
Ideally I would have this!
Code:
Private Sub Chk1_Click()
StrName = Name1
Call CheckFile
End Sub
Private Sub Chk2_Click()
StrName = Name2
Call CheckFile
End Sub
Private Sub CheckFile()
If some_condition_using_StrName Then
Me.Checkbox = False 'that's what I want to achieve and avoid specifically referencing Chk1 = False or Chk2 = False
End If
End Sub