Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Select Visible sheets



HI guys,

Whats the VBA to select all visible sheets and print them?

Visiblesheets.select?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Select Visible sheets

Sub PrintVisibleSheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Visible Then
ws.PrintOut Copies:=1, Collate:=True
End If
Next
End Sub

---
HTH
Jason
Atlanta, GA

-----Original Message-----


HI guys,

Whats the VBA to select all visible sheets and print

them?

Visiblesheets.select?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Select Visible sheets

Thanks Perfect! - Forgot to ask...if I want to exclude a specifically
named sheet (say called Contents) is that also possible?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Select Visible sheets

If your happy with multiple print jobs rather than what you asked then:

Sub PrintVisibleSheets()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Visible Then
if ws.Name < "Contents" then
ws.PrintOut Copies:=1, Collate:=True
end if
End If
Next
End Sub

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...
Thanks Perfect! - Forgot to ask...if I want to exclude a specifically
named sheet (say called Contents) is that also possible?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Select Visible sheets

If you want them as one print job:

Sub SelectVisible()
Dim bReplace as Boolean, sh as worksheet
Dim shActive as worksheet
set shActive = Activesheet
bReplace = True
For Each sh In ThisWorkbook.Worksheets
If sh.Visible Then
sh.Select bReplace
bReplace = False
End If
Next
ActiveWindow.SelectedSheets.PrintOut
shActive.select
End Sub

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...


HI guys,

Whats the VBA to select all visible sheets and print them?

Visiblesheets.select?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Select Visible sheets

See
http://www.rondebruin.nl/print.htm#visible


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Darin Kramer" wrote in message ...


HI guys,

Whats the VBA to select all visible sheets and print them?

Visiblesheets.select?

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
how do I select, cut, and paste visible cells only Cutting and pasting invisible cells. Excel Discussion (Misc queries) 2 May 10th 06 09:55 PM
Select Visible Cells Only Apparently Excel Discussion (Misc queries) 2 January 29th 05 12:40 AM
Select visible cells using vba Tony Excel Programming 3 January 5th 05 03:35 PM
Trying to select the visible range of cells Selector Excel Programming 1 February 1st 04 08:40 PM
select visible cells when printing Richard Leclezio Excel Programming 0 October 1st 03 10:22 AM


All times are GMT +1. The time now is 08:56 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"