Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable the scroll lock key in Excel

Status
Not open for further replies.

CamaroLT

Programmer
Dec 16, 2002
159
0
0
CA
I know that in Excel, the Scroll Lock key locks the cell so that when you hit the arrow key the entire page moves, not the cursor. However, I use Synergy and it uses Scroll Lock to lock the mouse pointer on whatever computer I happen to be using. The PROBLEM is that the two applications are fighting over what the state of that key is. Is there a way to get Excel to completely IGNORE the status of the Scroll Lock key? I don't use page scrolling anyways, so its the path of least resistance.

-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=
NEVER send the boss to do a techs job
 
Well, since there's no way to totally disable that feature, I think, my next best guess is to build a small VBA macro to run in the background to undo any scroll lock w/in Excel.

Unfortunately, I cannot find anything that will definitely work. It does make me curious, though, surely there is a way to test for it.. there's got to be a way that Excel reads it, and then changes settings based on the Scroll Lock.

You could look at scrolling region just to see.

If I can sort something out later, I'll post back with how to do it, but so far, I'm coming up empty.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Maybe something should be sent to Microsoft stating an incompatibility among programs and a toggle would be nice? I don't ever plan on using the page lock, as really I find it annoying than anything else even when I'm not using Synergy.

Really, I can't see it as being anything more than a quick patch to a particular DLL that checks a boolean in the registry or file and decides on whether to do the page scroll based on that check. But hey... I don't work for Microsoft. ;)

I think both applications check the status of the scroll lock key on any kind of event. So Excel checks on a key press, Synergy checks on screen swap. If you start programatically pushing that scroll lock key, the opposite app would note the change. Anything I've seen tries and plays with that button by virtually pressing the key.


-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=
NEVER send the boss to do a techs job
 
Well, the ideal method would be to disable it's affecting Excel, not the entire system. That's why I'm saying that if you can find the correct functions and all in Excel, in how it accepts the Scroll Lock and works with it, that would be ideal. I've just never tried, and didn't find anything definitive yet.

I did find mentions of the ScrollArea property that sounded like a possibility, but I did not do much testing with it.

Another possibility that I could see (that I'm not sure how ideal it would be) is that you run the SendKeys command to send out the scroll-lock keystroke whenever it's an issue. Now if you could capture exactly when to do that automatically, that'd be ideal - unless it caused issues for your other application.

And I was going to say that KVM switches, for instance, use the Scroll Lock key, but they would capture that outside of Windows anyway, so it really has no play on how the operating system handles it.

Well, keep digging, hopefully you'll find a solution. I know I don't time really to think about it at the moment, but perhaps later next week or the following, I will.

If you do find a solution, be sure to post back here.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top