Thread: Printing
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
losmac[_2_] losmac[_2_] is offline
external usenet poster
 
Posts: 44
Default Printing

If Worksheets("1").Range("I55") 0 Then
Worksheets("1").Range("A52:I67").Select
Selection.PrintOut
Else
If Worksheets("2").Range("I87") 0 Then
Worksheets("2").Range("A84:I99").Select

And so on

You need to set worksheet, context of work!

-----Original Message-----
I have a 20 sheet bid. I want to print half of each sheet

if cell I55 is 0 print range if not then go to the next
sheet check cell I87 is 0 print, or go to the next sheet
and so on. What am I missing? The first sheet only works.

If [I55] 0 Then
Range("A52:I67").Select
Selection.PrintOut
Else
If [I87] 0 Then
Range("A84:I99").Select
Selection.PrintOut
Else
If [I119] 0 Then
Range("A116:I131").Select
Selection.PrintOut
End If
End If
End If
End Sub

Thank you for you help!
.