View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Michael Bednarek[_5_] Michael Bednarek[_5_] is offline
external usenet poster
 
Posts: 4
Default Batch file to start multiple excel files with auto_open() macro. Delay code needed

On 25 May 2005 09:31:54 -0700, wrote in
microsoft.public.excel.programming:

Hello,

This is what I have in my batch file (as suggested by you):
path C:\
START "" /WAIT autoopen.xls
START "" /WAIT autoopen2.xls

The autoopen.xls and autoopen2.xls files have auto_open() macros that
start an update macro, and another one that saves and exit.

The batch file gou suggested starts both files one after another. In
other words, I have two excel files that update at the same time. The
wait command is only telling dos to wait until the file is opened.
After it is opened, it goes on even though the update, save, close
procedure is not finished.

What I need is to prevent having two files updating at the same time.


That's not how things work here (under NT5.1): here, I open the first
workbook - batch file sits and waits. I close the 1st workbook -
batchfile invokes the 2nd workbook and sits and waits. I close 2nd
workbook - batch file finishes.

Which operating system do you use and what's the auto_open VBA code?

--
Michael Bednarek
http://mbednarek.com/ "POST NO BILLS"