I want to switch on Caps & Number lock on opening an Excel document. I'm using the following code;
But nothing happens on opening. Where am I going wrong?Please Login or Register to view this content.
I want to switch on Caps & Number lock on opening an Excel document. I'm using the following code;
But nothing happens on opening. Where am I going wrong?Please Login or Register to view this content.
here's some code
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I was pondering why OT's code didn't work; and then it occurred to me that Caps Lock and Num Lock never make it out of the keyboard driver -- Excel wouldn't know what to do with them.
Entia non sunt multiplicanda sine necessitate
Hello OptionTrader,
Here is a more succinct version of the API send keys.
VBA Module Code
ThisWorkbook_Open Event CodePlease Login or Register to view this content.
Please Login or Register to view this content.
Last edited by Leith Ross; 01-17-2010 at 08:10 PM.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Thanks guys.
shg - Funny thing is original SendKeys code works fine in Excel 2007, but not 2003 (I need it to work in 2003).
Leith - Can't get that code to work.
Roy - Code works fine for Caps lock. How can I incorporate Num lock into the code ?
Hello OptionTrader,
When dealing with API calls and most other code, it helps to know what Operating System you have. You should update your profile to include which operating systems you use. Roy's checks your operating system, that why his working. So, I can assume you are not using Windows 2000 through Windows XP.
Just searched through the code on another computer & found this
Please Login or Register to view this content.
Last edited by royUK; 01-24-2010 at 01:10 PM.
sorry wrong page
Roy, is there any chance you could include the code to also switch on the CapsLock? I'd be most grateful.
Martin
THANX
very useful to me
Use Code-Tags for showing your code :
Please mark your question Solved if there has been offered a solution that works fine for you
If You like solutions provided by anyone, feel free to add reputation using STAR *
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks