Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ant
 
Posts: n/a
Default Print Array for hidden sheets using VBA

Is it possible to print multiple hidden sheets using the array function in
VBA? Currently my code opens them all up, prints, then closes them. However
this is quite slow and I don't really need, or want, to see the sheets.
Something like...

With Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4", _
"Sheet5", "Sheet6", "Sheet7"))
.PrintOut Copies:=1
End With

Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default Print Array for hidden sheets using VBA


Hi Ant,
First up I'd add the 2 lines below to the start of your code & the
respective "true" lines after your code:
Application.ScreenUpdating = False
Application.DisplayAlerts = False

If this doesn't help/speed it up enough, have a look at Ron Debruin's
page (I don't know how fast this technique is, as I have no printer at
home):
http://www.rondebruin.nl/print.htm#visible

Ron shows the use of an array in the "one liner code" near the base of
his page which suggests you were very close/have the solution. He
doesn't use a "with" construct (see below) but I don't know if it would
work on hidden sheets:

Sheets(Array("Sheet1", "Sheet3")).PrintOut
'all sheets in the array



Hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=526672

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can i print out bubble sheets using excel data? mike Excel Discussion (Misc queries) 0 March 24th 06 12:10 AM
How do I print a whole excel file in colour when the default is mo Chris C Excel Discussion (Misc queries) 11 March 23rd 06 07:47 AM
Print Array for hidden sheets using VBA Ant Excel Discussion (Misc queries) 0 March 22nd 06 04:31 PM
I can not print jpeg pics. inserted in my excell sheets. Chopper Excel Discussion (Misc queries) 0 August 29th 05 03:11 PM
How do I print several sheets in a workbook as one file, making t. aimeesue78 Excel Discussion (Misc queries) 2 April 7th 05 01:34 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"