Sergio
Sergio

Reputation: 109

Numlock and CAPSLOCK turned always ON in VBA Access

Hello i have a form written in VBA Access , when i type or select some values from comboboz or text some values, my NUMLOCK And CAPSLOCK key are turning OFF, how to make that they ALWAYS will be ON , i can't figure how?

Upvotes: 0

Views: 3767

Answers (1)

SeanC
SeanC

Reputation: 15923

this has code that will check and set capslock, numlock and scrolllock.

It uses the windows APIs

  Private Declare Function GetKeyboardState Lib "user32" _
     (pbKeyState As Byte) As Long
  Private Declare Function SetKeyboardState Lib "user32" _
     (lppbKeyState As Byte) As Long

to check and set the keyboard state - with this API, other fun things are available, such as playing with the windows key.

Upvotes: 1

Related Questions