Automatically Refreshing Data at 12am

  • Thread starter Thread starter AKorsakova
  • Start date Start date
A

AKorsakova

I want to set my worksheet that will always be open on my machine to
automatically refresh the data at 12am. Is the only way to do that with
a macro? If so, how do I go about that. Thanks!
 
So I can do something like this?
Public RunWhen As Double


Sub StartTimer()

RunWhen = Time() = #12:00:00 AM# + TimeSerial(24, 0, 0)
Application.OnTime earliesttime:=RunWhen, procedure:="The_Sub", _
schedule:=True
End Sub

Sub The_Sub()


ActiveWorkbook.RefreshAll
StartTimer

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top