Hi,
I would like to know if anyone has any vb script to contionally print
worksheets if a particular cell is > 0. I currently have 25 - 30
worksheets in a workbook and I plan on adding on more sheet to
reference the same cell in each worksheet. If the cell is greater
than 0, I want it to print out that worksheet via a macro assign to a
button. Thanks.
James
squenson - 29 Jul 2007 06:45 GMT
This macro only prints the sheets that have the value 8 in cell A1. Adapt to
your needs!
Sub PrintOnlySomeSheets()
For Each s In Sheets
If s.Cells(1, 1) = 8 Then ' <--- Adapt the cell position and value
to your needs
Sheets(s.Name).Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
Next
End Sub