mardi 25 février 2020

Revert a Checkbox value in the ChkBoxGroup_Click event

I have multiple checkboxes created, and I would like to prompt the users when they CLICK on the checkbox. They can only change the value of the check box with the correct PIN. If they enter a incorrect PIN, the checkbox will revert back to it's original value. However every time when it try to revert the checkbox value, it seems like it recursively calling the ChkBoxGroup_Click() event until a correct password is entered.

Private Sub ChkBoxGroup_Click()
    Dim ValidatePIN_RNT As Boolean

    ValidatePIN_RNT = ValidatePIN()
    If Not ValidatePIN_RNT Then
        ChkBoxGroup.Value = Not ChkBoxGroup.Value
        Exit Sub
    End If
End Sub



Aucun commentaire:

Enregistrer un commentaire