I am having problems with the sendKeys command in VB6. I am sending 10 to 20 keystrokes to another program in order to automate several dialog boxes make and selections in a drop down menu. Sometimes it seems to work and sometimes it doesn't work at all. On occasion I've had the VB program send keystrokes back to itself. I've worked both in the VB environment and with compiled files. It's been very inconsistent.
I am using the following syntax:
SendKeys ky$, True
Part of the ky$ string is an Open File dialog. The dialog opens and the filename shows up but then it hangs for about 5 to 10 seconds. Then it completes the keystrokes without problems sometimes including another file open dialog. Everything else seems to always work.
I have SendKeys before without ever having any problems. It's not an elegant solution but has saved me many hours of pounding the keyboard to get things done.
I am using XP Home Edition SP2, if that matters. I have VB6 Professional but I don't think I am using anything beyond the standard capabilities.
Thanks,
-Mike
I am using the following syntax:
SendKeys ky$, True
Part of the ky$ string is an Open File dialog. The dialog opens and the filename shows up but then it hangs for about 5 to 10 seconds. Then it completes the keystrokes without problems sometimes including another file open dialog. Everything else seems to always work.
I have SendKeys before without ever having any problems. It's not an elegant solution but has saved me many hours of pounding the keyboard to get things done.
I am using XP Home Edition SP2, if that matters. I have VB6 Professional but I don't think I am using anything beyond the standard capabilities.
Thanks,
-Mike