Thread: DOS batch files
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default DOS batch files

"Clif McIrvin" wrote in message
...

Does the workbook in question actually need to be closed for the
operations to take place, or are the operations happening to a different
file?

If a different file, put the VBA code in the Workbook.Close event.

If the same file, post back and either myself or someone else can help you
design code that will run after your workbook has finished exiting.


Basically, I need to put VBA code in Workbook.Close() that
deletes a file on the C: drive named "orders.txt". Then I need
to create a new replacement file named "orders.txt" which I
will write my own data into.