On a prior post I wanted to set print area based on the value in a cell, Leith Ross gave me the answer to that problem but, I didn't notice until I marked it solved that when printing out the report part of the print area did not print it cuts off about 1/2 inch of the report and on the print preview it looks correct. This is what Leith wrote:
Sub Macro2a()
Dim Item As Variant
Dim PrintRng As Range
Dim Wks As Worksheet
Set Wks = Worksheets("Master Control")
If Wks.Range("B136") > 1 Then Set Rng = Wks.Range("A1:V159"): GoTo StartPrinting
If Wks.Range("B96") > 1 Then Set Rng = Wks.Range("A1:V119"): GoTo StartPrinting
If Wks.Range("B53") > 1 Then Set Rng = Wks.Range("A1:V76"): GoTo StartPrinting
If Wks.Range("B12") > 1 Then Set Rng = Wks.Range("A1:V39")
If Rng Is Nothing Then Exit Sub
StartPrinting:
Wks.PageSetup.PrintArea = Rng.Address
Wks.PrintOut Copies:=1, Collate:=True
Wks.PageSetup.PrintArea = ""
For Each Item In Array("Jack Pot", "Card Accountability", "CGT Acct", "Cash Accountability")
Set Wks = Worksheets(Item)
Wks.PrintOut Copies:=1, Collate:=True
Next Item
End Sub
It is the correct area but does not print correctly any ideas.
Bookmarks