print w/o opening or open and print one at a time?

josh_m

Board Regular
Joined
Mar 26, 2009
Messages
81
ok, 1st post, here goes...
I have a macro where I can open multiple sheets, print a specific tab, close the sheet and move on to the next one until they are all done. Problem is I need to open so many it bogs down the pc.

Can I select all to be printed and print a specific tab without actually opening the file?
Or...
Can I select all to be printed, have them open, print, close one at a time?

here is my current code:

Sub PRINT_AUDIT()

Application.FindFile

Application.DisplayAlerts = False

For Each Workbook In Workbooks

Sheets("Margin Summary").PrintOut
ActiveWindow.Close

Next

End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
No, you can't print a file without opening it.

Why do you think that opening the files one at a time would be faster than the code that you've already got?
 
Upvote 0
i usually have around 80 files at a time to open and print, each at ~3.5MB. my pc can't handle opening that many at a time and I get something like a "out of system resources" error message if i try, so i have to run my code on smaller batches. I thought if there was a way to close the current file before the next one opens, my pc could handle that and I could select all files and let it run saving me a lot of time.
 
Upvote 0
Ah, I see. How about having a list of files somewhere ( in a sheet ) that you could loop through, doing the processing that way?
 
Upvote 0

Forum statistics

Threads
1,215,503
Messages
6,125,179
Members
449,212
Latest member
kenmaldonado

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
Back
Top