Hi there!
I've just added the following code to my workbook
and when I open it, the num lock turns off. Any idea why?Please Login or Register to view this content.
Hi there!
I've just added the following code to my workbook
and when I open it, the num lock turns off. Any idea why?Please Login or Register to view this content.
Last edited by boboivan; 03-31-2014 at 08:53 AM.
I added that to a blank workbook and tried and my numlock stays on - I'd suggest uploading an example workbook which demostrates the behaviour to check it isn't something else other than that code?
Edit: looking at google, it seems executing multiple sendkeys statements can turn numlock off (as a bug) - what is the macro supposed to do - maybe is there a way to do it without sendkeys?
Last edited by ragulduy; 03-31-2014 at 08:56 AM.
I've seen send keys do this before.
Try commenting outsaving and then re-opening.Please Login or Register to view this content.
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clicking below their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
You could try turning numlock back on using API like this:
Please Login or Register to view this content.
I am not a big fan of Sendkeys(). Even so, sometimes it will have to do.
I had thought of using API routine to check and set the numlock key status as well.
Here is an API method for a sendkeys sort of method. The advantage is that UAC status does not affect this method.
Put this in a Module.Please Login or Register to view this content.
For kicks, here two methods that I use for toggle keys like numlock.Please Login or Register to view this content.
Please Login or Register to view this content.
Please Login or Register to view this content.
Last edited by Kenneth Hobson; 03-31-2014 at 12:26 PM.
Thank you so much Kenneth!
Problem solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks