Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spawning a child process

Status
Not open for further replies.

Siggy19

Technical User
Jan 6, 2003
141
US
Is there any way to spawn a child process in VBA for Excel ?

I want to write a program to automatically check a folder for files every few minutes and, if it finds a file there to run a conversion utility in Excel. At any time, the user should be able to press a 'STOP' button on the screen to end the automation.

Any ideas ?
 
Hiya,

I have a batch tool set up to run overnight; it should start import processes once certain dependencies are met (i.e. previous imports running successfully) and once the files to be imported have been update (this is done by the Source System who FTPs the files before a certain cutoff time.

The code uses the [tt]Application.OnTime[/tt] function of Excel: we set off the batch every evening. Each process gets scheduled to run at a certain time, and as of that point checks for the files & dependencies every 5 minutes. If the files have arrived & dependencies have been met an import routine is called. If not, the process then reschedules itself to run again 5 minutes later using the [tt]Application.OnTime[/tt] function

I've found it works pretty well - both with the dependencies and with the file checks we need to do. We used to have many an obvernight batch failure due to late delivery of files, but these haven't happened since we started using the new OnTime version of our tool.

If you'd like more info let me know

HTH


Cheers
Nikki
[bat] Look, mommy, I'm flying!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top