View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Beach Peter Beach is offline
external usenet poster
 
Posts: 70
Default Automatic Updating

Hi Kiza,

Application.OnTime Date + 7 + TimeSerial(15,0,0), "Refresh"

should do the trick (assuming you want to refresh at 3:00pm in seven days
time).

Just FYI Date returns the number of days since 31 December 1899, so you can
just do ordinary integer arithmetic with it.

HTH

Peter Beach

"kiza " wrote in message
...
Hi,

I have the following VB Coding which activates macros on a regular
basis automatically, if Excel is left open.

Sub RunOnTime()
Application.OnTime Date + TimeSerial(15,0,0), "Refresh"
End Sub

Refresh is the macro which is being run.

The RunOnTime macro, activates the Refresh macro at 3pm every day.
Is there a way, or does anyone know, how I can get a macro similar to
this to run on a weekly basis rather than a daily basis as this one
currently does?

Thanks In Advance
Kiza


---
Message posted from http://www.ExcelForum.com/