#1   Report Post  
Posted to microsoft.public.excel.misc
ceemo
 
Posts: n/a
Default Refresh


I have a workbook with approx 5 imports on different worksheets and i
would like to refresh all them at precisely 18 minutes past every
hour.

Can this be done?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ardus Petus
 
Posts: n/a
Default Refresh

Option Explicit

Dim dNext As Date

Sub Auto_Open()
dNext = TimeSerial(Hour(Now) + IIf(Minute(Now) < 18, 0, 1), 18, 0)
Application.OnTime dNext, "refreshdata"
End Sub

Sub refreshdata()
MsgBox Now
dNext = TimeSerial(Hour(dNext) + 1, 18, 0)
Application.OnTime dNext, "refreshdata"
End Sub

Sub cancelTimer()
Application.OnTime dNext, "refreshdata", , False
End Sub

HTH
--
AP

"ceemo" a écrit dans le
message de news: ...

I have a workbook with approx 5 imports on different worksheets and i
would like to refresh all them at precisely 18 minutes past every
hour.

Can this be done?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:
http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248



  #4   Report Post  
Posted to microsoft.public.excel.misc
ceemo
 
Posts: n/a
Default Refresh


yes my data is imported via a web page.

Will the code provided meet my requirement?

i see the code includes a msg box will it prompt each time before
refresh as id like it to happen auto as its o display on a plasma
screen?


thank you for your help


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248

  #5   Report Post  
Posted to microsoft.public.excel.misc
ceemo
 
Posts: n/a
Default Refresh


Please see the previous posts.

I couldnt get them to work but i did manae to modify the code to the
below and it works for one refresh at 20 minutes past but doesnt
refresh after that. want it to keep refresh over and over if
possible?

Please can you help?

Option Explicit

Dim dNext As Date

Sub Auto_Open()

dNext = TimeSerial(Hour(Now) + IIf(Minute(Now) < 20, 0, 1), 20, 0)
Application.OnTime dNext, "refreshdata"
Workbooks(ActiveWorkbook.Name).RefreshAll
End Sub

Sub refreshdata()
dNext = TimeSerial(Hour(dNext) + 1, 20, 0)
Application.OnTime dNext, "refreshdata"
Workbooks(ActiveWorkbook.Name).RefreshAll
End Sub

Sub cancelTimer()
Application.OnTime dNext, "refreshdata", , False
End Sub


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248



  #6   Report Post  
Posted to microsoft.public.excel.misc
gareth93
 
Posts: n/a
Default Refresh


If you go into the workbook options, and set calculation to manual on
the "Calc" tab, and tick, "recalculate before save".

Then go into the tools menu and select autosave (if its not there, you
can install it from the add-ins option, or download). Then just set the
autosave time to 60minutes, and it will recalculate all formulas before
saving and it won't prompt you if you uncheck the box.

Simple solution, dont know what your running on your sheet, but it
should recheck imported data too. Worth a try.


GoJo


--
gareth93
------------------------------------------------------------------------
gareth93's Profile: http://www.excelforum.com/member.php...o&userid=26578
View this thread: http://www.excelforum.com/showthread...hreadid=550248

  #7   Report Post  
Posted to microsoft.public.excel.misc
ceemo
 
Posts: n/a
Default Refresh


Thanks for the info but i would like to code this in VB.
Anyone have any suggestions?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248

  #8   Report Post  
Posted to microsoft.public.excel.misc
ceemo
 
Posts: n/a
Default Refresh


Im still looking for some help on this one.

Can anyone please take a look as im half way there?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=550248

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2k Pivot Table refresh scenario GDCross Excel Discussion (Misc queries) 1 June 1st 06 09:12 PM
External Data Refresh on save problem RGS Excel Discussion (Misc queries) 0 May 8th 06 01:36 AM
How to refresh dropdown lists in PivotTables? Eleanor M Excel Discussion (Misc queries) 6 March 3rd 06 02:11 PM
Query parameter "refresh when value changes" doesn't refresh - why Texas_Toast Excel Discussion (Misc queries) 0 January 4th 06 03:32 PM
Refresh Imported Data - Does the Excel file have to be open? tinkertoy Excel Discussion (Misc queries) 0 June 23rd 05 07:51 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"