LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default Print question - Calling Dave Peterson!

'Dave Peterson
Dim curVis As Long
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
With sh
if lcase(sh.name) < "data" then
curVis = .Visible
.Visible = xlSheetVisible
.PrintOut
.Visible = curVis
end if
End With
Next sh
End Sub

--
Regards,
Tom Ogilvy



"Ant" wrote:

I saw this handy code on Ron Debruin's page which prints all hidden and
unhidden pages.

'Dave Peterson
Dim curVis As Long
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
With sh
curVis = .Visible
.Visible = xlSheetVisible
.PrintOut
.Visible = curVis
End With
Next sh
End Sub

Is it possible to incoporate some additional code which excludes some
sheets. Basically I have a report and I want to print all the pages (some
hidden) except the large data dump sheet. Lets say the sheet is called 'Data'.

Is this possible?

 
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
Dave Peterson atxcomputers Excel Discussion (Misc queries) 12 September 28th 05 06:17 PM
Combo Box or Data Validation FA Excel Discussion (Misc queries) 17 September 27th 05 01:58 PM
Countif by Year heater Excel Discussion (Misc queries) 17 September 2nd 05 06:52 PM
Office Excel 2003 Versions and VBA Cameron Young Setting up and Configuration of Excel 16 June 8th 05 12:54 AM
formula not working Micayla Bergen Excel Discussion (Misc queries) 13 May 23rd 05 01:48 PM


All times are GMT +1. The time now is 12:20 AM.

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"