Hi All,
I have a form with a textbox which I monitor for the user pressing 'Enter' on their keyboard. My function looks like this:
This morning, this worked fine, every time. Then suddenly when I run the form, I get the error "Sub or Function Not Defined" on 'If KeyCode', even though it clearly appears in the event declaration above.
Why is this happening, and happening seemingly out of the blue?!
Any help would be appreciated. Google doesn't yield any results.
Mav3000
I have a form with a textbox which I monitor for the user pressing 'Enter' on their keyboard. My function looks like this:
Code:
Private Sub tbxPassword_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
' Attempt login If Enter Is Pressed
If KeyCode = 13 Then LoginProcess
End Sub
This morning, this worked fine, every time. Then suddenly when I run the form, I get the error "Sub or Function Not Defined" on 'If KeyCode', even though it clearly appears in the event declaration above.
Why is this happening, and happening seemingly out of the blue?!
Any help would be appreciated. Google doesn't yield any results.
Mav3000