hi all,
im having difficulty with this macro. i'm attempting to have a clickable button that would print out certain spreadsheets based on certain criteria within a cell. Suppose cell A2 is greater than zero or is equivalent (referencing) a cell on a main sheet (should get the same result), i want to print out that spreadsheet and all others (there are over 50 sheets in this workbook) that fit that rule. here is what i have so far...
Sub WSPrint()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
If ws.Range("A2").Value = "> 0" Then
ws.PrintOut
End If
Next ws
End Sub
OR
Sub WSPrint()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Sheets
If ws.Range("A2").Value = "Main!$A$3" Then
ws.PrintOut
End If
Next ws
End Sub
Bookmarks