Print Code
Randy, If you have a formula in cell D20 the IsEmpty function will not work.
Also, If you do not want to print, you do not need the Else part of the If
.... Then statement because if it is not true it will not print. Here is my
suggestion.
Private Sub Print_All_Click()
Sheets("Commission Pool").PrintOut Copies:=1, Collate:=True
If Range("D20").Value "" Then
Sheets("Sr-Area Manager").PrintOut Copies:=1, Collate:=True
End If
End Sub
"Randy" wrote:
Greetings...
I have a little code I am needing some assistance with. The code is suppose
to print out certain sheets based on wether a particular cell on another
sheet is empty or not. If the cell is empty the sheet should not print...if
cell is not empty, the sheet should print.
Here is what I have....any assistance will be greatly appreciated!
.................................................. ...............................................
Private Sub Print_All_Click()
Sheets("Commission Pool").PrintOut Copies:=1, Collate:=True
If Not IsEmpty("D20") Then
Sheets("Sr-Area Manager").PrintOut Copies:=1, Collate:=True
Else
Sheets("Sr-Area Manager").PrintOut Copies:=1, Collate:=False
End If
End Sub
.................................................. ...............................................
Thanks again and have a wonderful and safe New Year celebration!
--
Randy Street
Rancho Cucamonga, CA
|