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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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