Message 1 of 14
VBA and Shell command

Not applicable
11-05-2003
12:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have an app, that consists of many different projects. Each project contains many different modules. The user selects from a list of different VBA projects to run by check boxes. In some cases, I have to run a batch routine which saves drawings, copies and moves files(done through the shell command in VBA). Anything to do with the shell command, or batch routine, I've placed that into a module that runs at the very end of the selected project.
When I run each process individually (select the specific process) in the application, everything works fine. But if I run multiple projects in the application, (select more than one specifc process) sometimes the dos command prompt is still running, when the other vba project starts. There are files that are required for both projects. As a result, with the dos prompt still running and the vba starting from the next selected project, the VBA crashes because the files are currently locked up in the dos command process.
How can I control the next project so that it doesn't start until the previous project is completely finished runnning? Including the dos prompt?