Auto Refresh
I am using a shared Excel 2007 spreadsheet on a work LAN. Is there some code
I can add to it to have it auto refresh at a preset interval. |
Auto Refresh
This may help you.
http://www.ozgrid.com/Excel/run-macro-on-time.htm -- "George" wrote: I am using a shared Excel 2007 spreadsheet on a work LAN. Is there some code I can add to it to have it auto refresh at a preset interval. |
Auto Refresh
Thanks that works - but the only thing I could find that I think
is refreshing the screen is the Save function, everything else gives me an error message. George "AFSSkier" wrote: This may help you. http://www.ozgrid.com/Excel/run-macro-on-time.htm -- "George" wrote: I am using a shared Excel 2007 spreadsheet on a work LAN. Is there some code I can add to it to have it auto refresh at a preset interval. |
Auto Refresh
George,
Put this code in your sub: ThisWorkbook.RefreshAll (see below) Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime dTime, "MyMacro", , False End Sub Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:15"), "MyMacro" 'test time set to 15 sec End Sub 'Place the following in any Standard Module (InsertModule) Public dTime As Date Sub MyMacro() dTime = Now + TimeValue("00:00:15") Application.OnTime dTime, "MyMacro" ThisWorkbook.RefreshAll MsgBox "Hooray my code works! All sheets are Refreshed" End Sub -- Kevin "George" wrote: Thanks that works - but the only thing I could find that I think is refreshing the screen is the Save function, everything else gives me an error message. George "AFSSkier" wrote: This may help you. http://www.ozgrid.com/Excel/run-macro-on-time.htm -- "George" wrote: I am using a shared Excel 2007 spreadsheet on a work LAN. Is there some code I can add to it to have it auto refresh at a preset interval. |
All times are GMT +1. The time now is 12:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com