Unfortunately, I'm having a rough time grasping conditional compiling. I did however get the code to work with a few amount outputs by removing the wait times.
CONDITIONAL COMPILING is a tool to make certain sections of code COMPILE or NOT COMPILE based on the value of a CONDTIONAL COMPILING CONSTANT. When I was testing the code, I did not have access (nor did I want access) to your external program. This allowed me to test the code.
For additional information see: http://www.utteraccess.com/wiki/inde...iler_Constants
The code as posted WILL COMPILE all your wait and Sendkey codes.
For work, I'm needing to output between 5,000 to 20,000 entries.
Excel stopped responding two out of three attempts, but I did work once.
Also, can this code be easily altered to run in the background so other work can be done simultaneously?
The code as written is a resource hog, as it continuously checks for waitTill to expire. Part of your problem may be that you eliminated the calculation of waitTill and the loop will run forever, waiting for a value that has already expired:
I don't know the sequence of events that is supposed to happen when you issue the SendKeys command. From your earlier code, it appears that you need a time delay after sending the SendKeys command. The time delay code you use now has granularity of 1 second. The Sleep api Command can be used with a granularity of milliseconds. I don't know if that will help you or not.
Example Using the Sleep command:
I hope this helps.
Lewis
Bookmarks