Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
scrolllock key off
hello, Can somebody tell me how to turn off the scrolllock key when i start a excel folder (VBA) Thanks -- whizzz2004 ------------------------------------------------------------------------ whizzz2004's Profile: http://www.excelforum.com/member.php...o&userid=33814 View this thread: http://www.excelforum.com/showthread...hreadid=535880 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
scrolllock key off
Try code like the following:
Declare Function GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long Declare Function SetKeyboardState Lib "user32" (lppbKeyState As Byte) As Long Const C_SCROLL_LOCK_KEY = 145 Sub ScrollLockOn() Dim lpbKeyState(256) As Byte GetKeyboardState lpbKeyState(0) lpbKeyState(C_SCROLL_LOCK_KEY) = 1 SetKeyboardState lpbKeyState(0) End Sub Sub ScrollLockOff() Dim lpbKeyState(256) As Byte GetKeyboardState lpbKeyState(0) lpbKeyState(C_SCROLL_LOCK_KEY) = 0 SetKeyboardState lpbKeyState(0) End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "whizzz2004" wrote in message ... hello, Can somebody tell me how to turn off the scrolllock key when i start a excel folder (VBA) Thanks -- whizzz2004 ------------------------------------------------------------------------ whizzz2004's Profile: http://www.excelforum.com/member.php...o&userid=33814 View this thread: http://www.excelforum.com/showthread...hreadid=535880 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|