![]() |
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! |
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! . |
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! |
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! |
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! |
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! |
All times are GMT +1. The time now is 07:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com