Hi All,
I have a workbook that I have put a Workbook_Open macro in:-
Sub Workbook_Open()
Timer
End Sub
This runs a timer:-
Sub Timer()
Application.OnTime Now + TimeValue("00:05:00"), "RefreshAllTables"
End Sub
Which refreshes my data, below:-
Sub RefreshAllTables()
ActiveWorkbook.RefreshAll
Timer
End Sub
Firstly, I'm sure these can all be put together in one macro (I'm a complete novice at this) but, interestingly, when I close the workbook, the macro still appears to be running and, when it refreshes the data, it re-opens the workbook.
Can I put an Auto_Close in that will stop the macro running but will not affect anything that may be running at the same time.
As always, any help is much appreciated.
Feastie.
Bookmarks