Randy;163997 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
Hello Randy,
Your IF statement is tautological. That is it always evaluates to the
same result.
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
Change it to this...
If Not IsEmpty("D20") Then
Sheets("Sr-Area Manager").PrintOut Copies:=1, Collate:=True
End If
Sincerely,
Leith Ross
--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.thecodecage.com/forumz/member.php?userid=75
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=45557