View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Schedule a macro on a specific time

http://www.iopus.com/guides/winscheduler.htm

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"smartin" wrote:

farid2001 wrote:
Dear Gentlemen

I have a file that contains about 100 workbooks
I would like to have code that opens a workbook at 1:00 am, runs my macro,
and when it finishes with that workbook, closes the workbook and opens the
next workbook, runs my macro, closes the workbook, and opens the next one and
so on.

Each workbook allready has a workbookopen code that runs my macro.
I also have a main workbook in that file that contains the complete Path of
every workbook.

Your help will be greatly appreciated.

Thanks & regards
farid2001


Well it sounds like you've done the part that can be done with Excel. To
open a workbook at 1AM you maybe can use Windows Scheduler/Tasks.

One caveat though, if you require the workbooks to be processed in
sequence (1 must finish before 2 updates, 2 must finish before 3
updates, etc.) then things are more complicated. I think a CMD ("DOS")
batch can be told to wait until a process completes before executing the
next command, but it's been a while since I've played with that.