Excel <> Windows Scheduler

  • Thread starter Thread starter David Overton
  • Start date Start date
D

David Overton

I want to run Excel from a windows scheduler task (it will
be running every hour) and when Excel opens I want it to
start a macro that will in turn open various files. Once
all files are opened and all the calculations are
complete, perform a save and close of Excel. Anyone know
how to do this?
 
David,

In the workbook that is opened by the Scheduler, use the Workbook_Open event
procedure to execute your code. In the ThisWorkbook code module, not a
regular code module, use

Private Sub Workbook_Open()
' your code here
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top