I have VBA code to make sure the numlocks are on, but we I try to compile it it tells me it needs to be in 64bit.
I do have 64bit, and I want to add this to all my database as we use the numpad a lot. We are so use to the numlocks being on all the time, but since we upgraded all our PC's to Win 10, the numlock always turns off.
Thanks a million for all your help.
Code:
Private Declare Sub keybd_event Lib "user32" ( _ ByVal bVk As Byte, _ ByVal bScan As Byte, _ ByVal dwFlags As Long, _ ByVal dwExtraInfo As Long) Private Const VK_NUMLOCK = &H90 Private Const KEYEVENTF_KEYUP = &H2 Declare Function GetKeyState Lib "user32.dll" ( _ ByVal nVirtKey As Long) As Integer Sub numon() 'NUM_Off NUM_On End Sub Sub NUM_TOGGLE() 'Toggle NUM-Lock key state keybd_event VK_NUMLOCK, 1, 0, 0 keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0 End Sub Sub NUM_On() 'Turn NUM-Lock on If Not (GetKeyState(vbKeyNumlock) = 1) Then keybd_event VK_NUMLOCK, 1, 0, 0 keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0 End If End Sub Sub NUM_Off() 'Turn NUM-Lock off If (GetKeyState(vbKeyNumlock) = 1) Then keybd_event VK_NUMLOCK, 1, 0, 0 keybd_event VK_NUMLOCK, 1, KEYEVENTF_KEYUP, 0 End If End Sub
Thanks a million for all your help.
Comment