Help with Application.OnTime

A

aswini.ks

Hi,

I am writing an Excel macro that has a sequence of 5 tasks to complete.
Each task is completed by saving a file. Now, I want the processing for
the second task to start only after the first task's output file has
been saved.

' Task 1
::::
::::
Application.OnTime Now + TimeValue("00:10:00"), SrcFlPath + DataFlName
+ "!Module1.SaveFile"

' Task 2
:::::::::
::::::::
where the SaveFile subroutine saves an output file in the target
location and closes the output file for each task.

Currently, since the file is saved after 10 minutes time, the second
task's processing starts without waiting for the output file to be
saved and the first task completed. How can I ensure that the second
task starts only after first task's file has been saved?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top