MrExcel Publishing
Your One Stop for Excel Tips & Solutions

auto print

Posted by Gary Barton on September 07, 2001 9:04 AM

Dear Mr. Excel,
I have an excel worksheet (office97) that is collecting
data on a continuous basis. I would like to print
the worksheet automatically 3 times a day.
Is this possible??
I thinks I need a vb macro but I don't know how
to do that yet.
Thanks, Gary

Posted by Barrie Davidson on September 07, 2001 9:41 AM

Gary, try using this macro. Note that this assumes you have a macro for printing called "Print_Out".

Sub timer()
Application.OnTime TimeValue("10:00:00"), "Print_Out"
Application.OnTime TimeValue("13:00:00"), "Print_Out"
Application.OnTime TimeValue("16:00:00"), "Print_Out"
End Sub

You will have to run this macro at the beginning of the day and it will run the "Print_Out" macro at 10:00 am, 1:00 pm, and 4:00 pm. All you need to do is change the name of the macro to run (from "Print_Out") and the times you want to print.


Posted by Gary B on September 07, 2001 3:30 PM

Thanks you so much, Mr Davidson.
I was able to get it to work right away.
Will be checking out your web site too.