ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I turn scroll lock off (2007 excel)? No scroll lock key (https://www.excelbanter.com/excel-discussion-misc-queries/243050-how-do-i-turn-scroll-lock-off-2007-excel-no-scroll-lock-key.html)

Cameron A Perth

How do I turn scroll lock off (2007 excel)? No scroll lock key
 
The keyboards we use don't have a scroll lock button and someone has somehow
accidentally turned the scroll lock on and the arrows now move the whole
sheet instead of between cells.

Can't seem to locate short cut or command to turn scroll lock off.

Thanks


KC

How do I turn scroll lock off (2007 excel)? No scroll lock key
 
Righ Click on worksheet (say sheet1), then click on View Code.

paste the below code

'Begaining of the code
Private Declare Sub keybd_event Lib "user32.dll" _
(ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)

Const VK_SCROLL = &H91
Const KEYEVENTF_KEYUP = &H2

Private Sub myScroll_Lock()
keybd_event VK_SCROLL, 0, 0, 0 'Press Scroll Lock
keybd_event VK_SCROLL, 0, KEYEVENTF_KEYUP, 0 'Release Scroll Lock
End Sub
'end of the code

now go back to your excel sheet and goto Macros (Alt+F8), and run
myScroll_Lock
everytime you run this function the scroll lock will toggle.

-kc
*Click YES if this works

"Cameron A Perth" wrote:

The keyboards we use don't have a scroll lock button and someone has somehow
accidentally turned the scroll lock on and the arrows now move the whole
sheet instead of between cells.

Can't seem to locate short cut or command to turn scroll lock off.

Thanks



All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com