E
Elton Law
Dear expert,
I recently try a new time macro. That is to back up the file at night time.
Then once I come back to office on next day, back-up has been finished
already.
Scripts are below ...
Open the file as of the path shown up in cell H3.
Activate the file windows called "Fixings", then save the file name as of
the file path in cell S2.
I have added "Calculate" many times in the scripts to make sure it reloads
all data before it saves ...
But ..............
I set at 3:30 am and save the file at 3.31 am.
To be honest, the file I opened is very large and usually takes 10 mins to
open, refresh data, etc .....
Look like "calculate" is not enough to refresh the data.
Is it possible to set a pause in macro ?
Say 15 mins .... then continue to run the ret of the scripts...
Thanks
************************
Windows("Openfile.XLS").Activate
Calculate
Workbooks.Open Filename:=Sheets("Sheet1").Range("H3").Value
Windows("Fixings.XLS").Activate
Calculate
Application.DisplayAlerts = False
Workbooks("Fixings.xls").SaveAs
Filename:=Workbooks("Openfile.xls").Sheets("Sheet1").Range("S2")
ActiveWorkbook.Close Savechanges:=True
************************
I recently try a new time macro. That is to back up the file at night time.
Then once I come back to office on next day, back-up has been finished
already.
Scripts are below ...
Open the file as of the path shown up in cell H3.
Activate the file windows called "Fixings", then save the file name as of
the file path in cell S2.
I have added "Calculate" many times in the scripts to make sure it reloads
all data before it saves ...
But ..............
I set at 3:30 am and save the file at 3.31 am.
To be honest, the file I opened is very large and usually takes 10 mins to
open, refresh data, etc .....
Look like "calculate" is not enough to refresh the data.
Is it possible to set a pause in macro ?
Say 15 mins .... then continue to run the ret of the scripts...
Thanks
************************
Windows("Openfile.XLS").Activate
Calculate
Workbooks.Open Filename:=Sheets("Sheet1").Range("H3").Value
Windows("Fixings.XLS").Activate
Calculate
Application.DisplayAlerts = False
Workbooks("Fixings.xls").SaveAs
Filename:=Workbooks("Openfile.xls").Sheets("Sheet1").Range("S2")
ActiveWorkbook.Close Savechanges:=True
************************