hi,
yes there is.
the Application.OnTime method. But the file has to be open for it to fire on
time. here is code i use. if it is friday, the code skips the weekend. if it
is not friday, the code fires a 5am the next day. if he does not have the
file open before 8am then the code will not fire untill the next 8 oclock.
look up Application.OnTime in
VB help for more info. "yourMacro" is the name
of the macro you want to run at the specified time.
Sub macALaunchMR()
If Weekday(Now()) = 6 Then '1 = Sunday, 2 = Monday, 3 = Tuesday, ect
Application.OnTime Now() + 2.5 + TimeValue("00:00:03"), "yourMacro"
Else
Application.OnTime TimeValue("05:00:00"), "yourMacro"
End If
End Sub
suggestion. if he is that forgetfull then why not put the code in a file
open event so that the code runs when he opens the file?
regards
FSt1
"Decreenisi" wrote:
My customer has a WS, with a pivot table. In the WS he has a button
with a macro which sorts the pivot data into suppliers, and make a view
screen specific to each supplier. The problem is he has to remember to
push the button !!! Does anyone know if it is posible to run this
macro automatically, so that it exicutes every morning @ 8:00 am. Can
you add code to the macro, or does it have to be something completely
different.
Thanks