Thread: NUM LOCK status
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default NUM LOCK status

Try simply -

Declare Function SetKeyboardState _
Lib "User32" (kbArray As Byte) As Long

Sub NumLocker()

Dim KeyState(0 To 255) As Byte
KeyState(&H90) = 1 ' 1 NumLock on, 0 for off
SetKeyboardState KeyState(0)
End Sub


"Black1" wrote in message
...

Unfortunately I cant get his solution to work, I keep getting

"Can't find DLL entry point getkeyboardstate in user32"

Any (further) suggestions?