ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to turn SCROLL LOCK OFF, when kwy not on keyboard? (https://www.excelbanter.com/excel-discussion-misc-queries/161101-how-turn-scroll-lock-off-when-kwy-not-keyboard.html)

Margarita

how to turn SCROLL LOCK OFF, when kwy not on keyboard?
 
How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?

Gord Dibben

how to turn SCROLL LOCK OFF, when kwy not on keyboard?
 
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?



Chip Pearson

how to turn SCROLL LOCK OFF, when kwy not on keyboard?
 
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?



Tyro[_2_]

how to turn SCROLL LOCK OFF, when kwy not on keyboard? Gord
 
Gord:
You anwer a lot of questions; I have one concerning worksheet consolidation
using Excel's consolidation. Not my own.
No one will answer. Would you look at it for me, please?

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?





Gord Dibben

how to turn SCROLL LOCK OFF, when kwy not on keyboard? Gord
 
Not a feature I have ever used but post the message ID do'd we can all have a
look at your question.


Gord



On Fri, 5 Oct 2007 16:41:19 -0700, "Tyro" wrote:

Gord:
You anwer a lot of questions; I have one concerning worksheet consolidation
using Excel's consolidation. Not my own.
No one will answer. Would you look at it for me, please?

"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?





Tyro[_2_]

how to turn SCROLL LOCK OFF, when kwy not on keyboard? Gord
 
I have posted. No one will answer

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Not a feature I have ever used but post the message ID do'd we can all
have a
look at your question.


Gord



On Fri, 5 Oct 2007 16:41:19 -0700, "Tyro" wrote:

Gord:
You anwer a lot of questions; I have one concerning worksheet
consolidation
using Excel's consolidation. Not my own.
No one will answer. Would you look at it for me, please?

"Gord Dibben" <gorddibbATshawDOTca wrote in message
. ..
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?






Gord Dibben

how to turn SCROLL LOCK OFF, when kwy not on keyboard? Gord
 
If you don't post the message ID I'm not inclined to go searching for your
original post.


Gord

On Fri, 5 Oct 2007 16:55:08 -0700, "Tyro" wrote:

I have posted. No one will answer

"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
Not a feature I have ever used but post the message ID do'd we can all
have a
look at your question.


Gord



On Fri, 5 Oct 2007 16:41:19 -0700, "Tyro" wrote:

Gord:
You anwer a lot of questions; I have one concerning worksheet
consolidation
using Excel's consolidation. Not my own.
No one will answer. Would you look at it for me, please?

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?






Chip Pearson

how to turn SCROLL LOCK OFF, when kwy not on keyboard? Gord
 
I have posted. No one will answer

I answered.


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

"Tyro" wrote in message
t...
I have posted. No one will answer

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Not a feature I have ever used but post the message ID do'd we can all
have a
look at your question.


Gord



On Fri, 5 Oct 2007 16:41:19 -0700, "Tyro" wrote:

Gord:
You anwer a lot of questions; I have one concerning worksheet
consolidation
using Excel's consolidation. Not my own.
No one will answer. Would you look at it for me, please?

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Read the manual that came with your keyboard.

Or maybe you just missed seeing the ScrLk on the Pause/Break key?


Gord Dibben MS Excel MVP


On Fri, 5 Oct 2007 15:53:02 -0700, Margarita
wrote:

How to turn SCROLL LOCK OFF, when Scroll Lock KEY not on keyboard?







Margarita

how to turn SCROLL LOCK OFF, when kwy not on keyboard?
 
To all the other answers: Key not on keyboard. I want to know how to turn
it On or Off from within the program's system.

Chip, somehow I think that you make more sense, but can you be a bit less
technical and more explicit?

Isn't dangerous to try and change the Reigester I.D. functions? (if it is
what this is)

Does "It is not a system global method." means that it will only work on
that one worksheet?

If that is the case, isn't too much work to be doing it for every worksheet?

Isn't there a much simpler answer, like for example a check mark in excel
options? he he... they should have thought about this one, either keyboard
makers or MSN programmers.





"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?



Margarita

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?




All times are GMT +1. The time now is 02:17 AM.

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