View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Paul B
 
Posts: n/a
Default select sheets for printing

bennyob, try this,

Sub Print_sheets()
'will print sheet with a vavle 0 in C2
For Each Sheet In ThisWorkbook.Worksheets
Sheet.Activate
If Range("C2").Value 0 Then

'use this to test and comment out below
ActiveSheet.PrintPreview

'use this to print
'ActiveSheet.PrintOut Copies:=1, Collate:=False

End If
Next
End Sub


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"bennyob" wrote in message
...
Can anyone tell me how to select sheets in a workbook based on a cell

value
for printing?
I have many sheets, I want to select all the sheets that have a value
greater than 0 in C2 for printing, which I guess will then go something

like:
ActiveWindow.SelectedSheets.PrintOut
Thanks in advance for help
Benny