macro printing question

C

cb

HI-
I have a macro set up to print a series of different
ranges on several different worksheets within a single
workbook.
My problem:

In several places, if a specific cell=0, I want the macro
to skip the next print range and go onto the next.
Can I add that somehow to the macro?? and if so, how
would I do that??

Any help would be SO appreciated - thanks in advance.
cindy
 
C

cb

Hi-
Thanks for replying - here is the macro... which actually
brings up another question.....

The first 2 worksheets print are OK.
On the "Social Serv" worksheet - I have 2 print ranges;
part 1 and part 2 -- I now have them both selected when I
set the print area, but what I need is this:
Print part 1
If cell K170=0
Do not print part 2

This same senario is true for the other 3 sheets. thanks
again for looking at this...

Sub newPrint()
'
' newPrint Macro
' Macro recorded 8/9/2004 by cindyb
'

'
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("B").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("SOCIAL SERV").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("COMMIS").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("AUDITOR").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
Sheets("PAYROLL").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
Collate:=True
End Sub
 
D

Don Guillett

something like this might work to not print the hidden rows

ActiveWindow.PrintOut

Sheets("B").PrintOut

with Sheets("SOCIAL SERV")
if .range("k170")=0 then .rows("3:23").hidden=true
..PrintOut
..rows("3:23").hidden=false
end with
 
Top