Good morning all,
Does anyone know how I can print something every day at 08:00, automatically.
I have been playing around with the ontime command within a macro, but can't get it to work.
thanks
Good morning all,
Does anyone know how I can print something every day at 08:00, automatically.
I have been playing around with the ontime command within a macro, but can't get it to work.
thanks
I am using 2 macros
Use the SetPrintTime to setup your print OnTime command -
the PrintDaily macro also uses the OnTime command to at a later time.
You can not use Application.OnTime TimeValue("08:00"), "PrintDaily" command from within the PrintDaily macro else it will run more than once on the same day
Sub PrintDaily()
' your code here to print etc
activesheet.print
' sets application to run a macro to set printdaily run time
Application.OnTime TimeValue("010:00"), "setPrintDaily"
End Sub
Sub SetPrintTime()
'set printdaily run time
Application.OnTime TimeValue("08:00"), "PrintDaily"
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks