Try to understand following rules which is given below. It will decipher your problem:
Code:
Private Sub txtPassw_KeyDown(KeyCode As Integer, Shift As Integer)
If Shift = vbCtrlMask And (Chr(KeyCode) = "v" Or Chr(KeyCode) = "V") Then
Txt_Password.Locked = True
Else
Txt_Password.Locked = False
End If
End Sub
Private Sub txt_Password_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbRightButton Then
Txt_Password.Locked = True
Else
Txt_Password.Locked = False
End If
End Sub
Bookmarks