DoEvents appears not to work

  • Thread starter Thread starter Jeff C
  • Start date Start date
J

Jeff C

I have the following:
Function M5_Process()
DoCmd.SetWarnings False
Call Shell("C:\ScheduledTasks\01.bat", 1)
DoEvents
Call Shell("C:\ScheduledTasks\02.bat", 1)
DoEvents
DoCmd.RunMacro "M1_BringInData", , ""
DoEvents
DoCmd.RunMacro "M2PrintReport", , ""
DoCmd.SetWarnings True
End Function


The first Call Shell runs 01.bat that takes about 15 seconds to execute.
Even with the DoEvents, the second Call Shell begins executing 02.bat.
o2.bat relies on 01.bat having been executed so I am getting error.

What is causing DoEvents to fail? Thanks in advance.
 
Back
Top