delay some print to prevent error

Jake975

Board Regular
Joined
Feb 9, 2020
Messages
114
Office Version
  1. 2016
Platform
  1. Windows
This code is used to send documents to the printer but when they get sent all at once I usually have to one of the documents so it prints
VBA Code:
Call FilePrint("C:\Audit Reports\Compiled" + "\Night Audit " & Format(Date - 1, "mm-dd-yyyy") & ".pdf")
Call FilePrint("C:\Audit_Processing\Cash Deposit Log.xlsm")
Call FilePrint("C:\Audit_Processing\GM Packet Coversheet - IHG Limited Service.docx")
Call FilePrint("C:\Audit Reports\Disembodied\" + Format(Date - 1, "mm-dd-yyyy") + "\Out of Order.pdf")
Call FilePrint("C:\Audit Reports\Disembodied\" + Format(Date - 1, "mm-dd-yyyy") + "\Manager Report.pdf")
'End Sub
Here is the code that actually prints each file
VBA Code:
   ShellExecute Application.hwnd, "Print", strFilePath, 0&, 0&, SW_HIDE
How can i delay one or two of them to prevent failed prints?
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,610
Messages
5,765,412
Members
425,285
Latest member
andypandypoo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top