View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vic Eldridge Vic Eldridge is offline
external usenet poster
 
Posts: 50
Default Sendkeys will change the status of Numlock

Take a look here,
http://support.microsoft.com/default...b;en-us;179987

If that doesn't help then you might want to completely do away
with Sendkeys and use pure APIs to do the job. In most cases you
can use functions like EnumWindows & EnumChildWindows to drill down
to a particular textbox within an app and then use SendMessage to
write text to it. It's a lot trickier than Sendkeys but a lot more
robust too.
I'm sure the folks over at microsoft.public.vb.winapi would be glad to help.


Regards,
Vic Eldridge


Kenneth Lam wrote in message . ..
Hi,

I am using SENDKEYS to help to enter data into Peachtree (an
accounting program). I have set the sequence of the data entry exactly
the same as if the data was entered by me using the keyboard. So the
result in Peachtree is the same.

The different is that when EXCEL using sendkeys to send the keystroke,
the NUMLOCK status will on and off and on and off. So after the
current data are all passed to Peachtree and go back to EXCEL, I have
to look at the number lock status and turn it on if it is off, before
I can use the kkeypad to enter another data. No all the time will off.
So I have to check it every time after the VBA has run.

I have tried this in other program (IE / NOTEPAD / ACDSee) and have
the same problem. Any suggestions on anything I have done wrong?

Thanks.

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