jeudi 10 juin 2021

Masking Password using checkbox in VBA Excel

I have a Text box (PinEntry) and a Check box. The Check box will mask the password when checked. However, it only masks once. I understand the logic of the first subroutine that it should mask entries as long as I am still entering values in the Text box.


Private Sub CheckBox1_Click()
If AccessForm.PinEntry.Value = True Then
    AccessForm.PinEntry.PasswordChar = ""
ElseIf AccessForm.PinEntry.Value = False Then
    AccessForm.PinEntry.PasswordChar = "*"
Else
    AccessForm.PinEntry.PasswordChar = "*"
End If
End Sub

Private Sub PinEntry_Change()
CheckBox1_Click
End Sub




Aucun commentaire:

Enregistrer un commentaire