Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing all Visible sheets
Hi
I get an error message "Method 'PrintOut' of Object_'Worksheet' failed when running the following Macro: Sub PrintVisibleSheets_2() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets If ws.Visible Then If ws.Name < "Grading_guid" Then ws.PrintOut Copies:=1, Collate:=True End If End If Next End Sub I have turned protectin on on some of the sheets. One sheet is Very Hidden Line that it highlights to debug is ws.Printout line The Macro used to work before!!! (i even tried to delete the IFws.name line (not essential not to print that one) - so question is how can I print all visible sheets in a workbook?? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing all Visible sheets
VeryHidden sheets evaluate to True in
If ws.Visible Then Try if ws.Visible = xlSheetVisible Then -- HTH RP (remove nothere from the email address if mailing direct) "Darin Kramer" wrote in message ... Hi I get an error message "Method 'PrintOut' of Object_'Worksheet' failed when running the following Macro: Sub PrintVisibleSheets_2() Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets If ws.Visible Then If ws.Name < "Grading_guid" Then ws.PrintOut Copies:=1, Collate:=True End If End If Next End Sub I have turned protectin on on some of the sheets. One sheet is Very Hidden Line that it highlights to debug is ws.Printout line The Macro used to work before!!! (i even tried to delete the IFws.name line (not essential not to print that one) - so question is how can I print all visible sheets in a workbook?? Thanks D *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing all Visible sheets
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing only Rows with Visible Data | Excel Discussion (Misc queries) | |||
visible sheets | Excel Programming | |||
HELP!! Cannot set any sheets to visible | Excel Programming | |||
HELP!! Cannot set any sheets to visible | Excel Programming | |||
select visible cells when printing | Excel Programming |