Hi can anyone help me make this code work this is sort of what i want to happen, it is for printing various pages depending if there is information on them, if there is not i dont want to print that page. Also i need them to print as 1 job and not individual pages.
Thanks
Chris
Code:
Sub PrintOrderNew()
Application.ScreenUpdating = False
Sheets("JobDetails").Visible = True
Sheets("ProductOrder").Visible = True
Sheets("AccessoryOrder").Visible = True
If Range("OrderDetails!D2") > "0" And Range("ProductOrder!B11") > "0" And Range("AccessoryOrder!B11") > "0" Then
Range("JobDetails!A1:J43" And "ProductOrder!A1:G51" And "AccessoryOrder!A1:G51").Select
Selection.PrintPreview
End If
If Range("OrderDetails!D2") > "0" And Range("ProductOrder!B11") > "0" And Range("AccessoryOrder!B11") = "0" Then
Range("JobDetails!A1:J43" And "ProductOrder!A1:G51").Select
Selection.PrintPreview
End If
If Range("OrderDetails!D2") > "0" And Range("ProductOrder!B11") = "0" And Range("AccessoryOrder!B11") = "0" Then
Range("JobDetails!A1:J43").Select
Selection.PrintPreview
End If
If Range("OrderDetails!D2") > "0" And Range("AccessoryOrder!B11") > "0" And Range("ProductOrder!B11") = "0" Then
Range("JobDetails!A1:J43", "AccessoryOrder!A1:G51").Select
Selection.PrintPreview
End If
Sheets("JobDetails").Visible = False
Sheets("ProductOrder").Visible = False
Sheets("AccessoryOrder").Visible = False
Sheets("EclipseOrderPage").Select
Range("A1").Select
End Sub
Chris