create a button to print certain tabs in excel 2003

L

larry504

I would like a way to search every tab in 1 workbook and the same cell on
each tab, than based an the value in the cell print the page or not
 
O

Otto Moehrbach

Something like this perhaps. I assumed the cell to check is A1, and to
print B1:G50 if A1>25. Post back if you need more. HTH Otto
Sub PrintIf()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
With ws
If .Range("A1") > 25 Then
.Range("B1:G50").PrintOut
End If
End With
Next ws
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top