Forum Discussion
adlih
Jul 24, 2020Copper Contributor
[ HELP ] VBA In a user form, a problem occur after I used [ SendKeys "{ }"]
VBA In a user form, I used [ SendKeys "{ }"], Then NumLock AUTO DROP sometime = = HOW TO prevent THAT?
Subodh_Tiwari_sktneer
Jul 24, 2020Silver Contributor
adlih
Jul 27, 2020Copper Contributor
Thank you for your message,
but the problem still occur Subodh_Tiwari_sktneer
MY MAIN CODE HERE:
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
CommandButton1_Click
SendKeys "{LEFT}"
Dim numLock As New NumLockClass
If numLock.value = False Then numLock.value = True
End If
End Sub
- Subodh_Tiwari_sktneerJul 27, 2020Silver Contributor
You are right. After testing it multiple times I also found that the numlock gets turned off after regular intervals. SendKeys are notorious for this weird behavior.
I will let you know if I come across any workaround for this.
- adlihJul 29, 2020Copper Contributor
Thank you~Subodh_Tiwari_sktneer