Tyler
Tyler

Reputation: 3

Excel Macro, pause before printing

I have an Excel Macro that opens multiple excel sheets and prints them, pretty simple in nature. The excel files that are being printer has images called into them from a folder.

If i open the single excel file, images load, and then it prints just fine, but if I use the macro to print the excel file, the images do not print. It seems to me that the macro is printing too quickly and not allowing the images to load. Is there a way to pause the print function for 2 seconds to allow for excel file to load? Here is the code:

Set wkb2 = Workbooks.Open(printMe2)
wkb2.PrintOut Copies:=1, Collate:=True
wkb2.Close

Upvotes: 0

Views: 1209

Answers (1)

Diogo
Diogo

Reputation: 132

Sure!! Change it to value you want! I put 2 seconds for you.

Set wkb2 = Workbooks.Open(printMe2)
Application.Wait Now() + TimeValue("00:00:02")
wkb2.PrintOut Copies:=1, Collate:=True
wkb2.Close

Upvotes: 2

Related Questions