LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how to turn SCROLL LOCK OFF, when kwy not on keyboard?

the scroll lock function can be triggered in the On-Screen Keyboard. This
application is normally found in Start - Programs - Accessories -
Accessibility
Clicking on the 'scroll lock' in the On-Screen Keyboard should have the same
function as pressing a physical scroll lock key.

This is much easier.


"Chip Pearson" wrote:

Margarita,

You can use code like the following. Below are procedures for turning Scroll
Lock on, off, and toggling between on and off. It applies only to the
calling thread. It is not a system global method.

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

Sub SetScrollLock()
Dim K(0 To 255) As Byte
GetKeyboardState K(0)
K(145) = 1
SetKeyboardState K(0)
End Sub

Sub ClearScrollLock()
Dim K(0 To 255) As Byte
GetKeyboardState K(0)
K(145) = 0
SetKeyboardState K(0)
End Sub

Sub ToggleScrollLock()
Dim K(0 To 255) As Byte
GetKeyboardState K(0)
If K(145) < 0 Then
K(145) = 0
Else
K(145) = 1
End If
SetKeyboardState K(0)
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Margarita" wrote in message
...
How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scroll Lock ? Rob L Excel Discussion (Misc queries) 1 August 12th 07 08:54 AM
Scroll lock.... Ximena Excel Discussion (Misc queries) 2 February 4th 07 05:26 PM
How do i deactivate the scroll key of the keyboard in the ecxell. jboureau Excel Discussion (Misc queries) 1 December 31st 06 04:35 PM
Lock the Keyboard [email protected] Excel Discussion (Misc queries) 5 May 25th 05 06:23 PM
Scroll Lock jrh Excel Discussion (Misc queries) 0 January 18th 05 03:38 PM


All times are GMT +1. The time now is 12:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"