Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default SENDKEYS change the "Number Lock" status


Hi,

I am using sendkeys to enter data into Peachtree. I found that after
Excel changed to Peachtree and start entering, the number lock
"sometimes" will on and off for several times.

I have tried to write a "plain" macro with "sendkeys" only and test on
other software and found it is the same. The status will also change.
The pattern is not fixed. That is under the same problem and same
string being sent, sometimes will flash 2 times and sometimes may
flash 5 times.

Any suggestions?

Thanks.
---
Please remove NOSPAM- in the email address when replying by email.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default SENDKEYS change the "Number Lock" status

Option Explicit
Declare Function SetKeyboardState Lib "User32" (kbArray As Byte) As Long
Sub toggleit()
Dim KeyState(0 To 255) As Byte
KeyState(&H90) = 1 'for on 0 for off
SetKeyboardState KeyState(0)
End Sub

Worked ok for me in win98.


Kenneth Lam wrote:

Hi,

I am using sendkeys to enter data into Peachtree. I found that after
Excel changed to Peachtree and start entering, the number lock
"sometimes" will on and off for several times.

I have tried to write a "plain" macro with "sendkeys" only and test on
other software and found it is the same. The status will also change.
The pattern is not fixed. That is under the same problem and same
string being sent, sometimes will flash 2 times and sometimes may
flash 5 times.

Any suggestions?

Thanks.
---
Please remove NOSPAM- in the email address when replying by email.


--

Dave Peterson

Reply
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
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
EXCEL allow 2 options on status bar e.g. show "Count" + "Sum" LEJM Excel Discussion (Misc queries) 2 November 15th 07 07:49 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
"lock" fields so they don't change number while copying formulas? MrHaugen Excel Discussion (Misc queries) 1 July 11th 06 09:52 PM
Formulae or format to change a number "1" into the word "one Excel Help Excel Discussion (Misc queries) 1 May 30th 06 04:25 PM


All times are GMT +1. The time now is 11:47 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"