close

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!You need to use VBA code. See www.cpearson.com/excel/ontime.htm
for details and example code.gt; wrote in message oups.com...
gt;I want to set my worksheet that will always be open on my
gt;machine to
gt; automatically refresh the data at 12am. Is the only way to do
gt; that with
gt; a macro? If so, how do I go about that. Thanks!
gt;
So i can do something like this?
Public RunWhen As DoubleSub StartTimer()

RunWhen = Time() = #12:00:00 AM# TimeSerial(24, 0, 0)
Application.OnTime earliesttime:=RunWhen, procedu=quot;The_Subquot;, _
schedule:=True
End Sub

Sub The_Sub()ActiveWorkbook.RefreshAll
StartTimer

End Sub

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()