Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
PRINT IF in VBA
I am trying to have a file print in legal size if I have 56 lines filled in
otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
#2
|
|||
|
|||
PRINT IF in VBA
If Row - nr 56 Then ActiveSheet.PageSetup.PaperSize = xlPaperLegal
xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "Curt D." wrote in message ... I am trying to have a file print in legal size if I have 56 lines filled in otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
#3
|
|||
|
|||
PRINT IF in VBA
I copied it and placed it in the macro but I get a syntex error, what am i
doing wrong? "PY & Associates" wrote: If Row - nr 56 Then ActiveSheet.PageSetup.PaperSize = xlPaperLegal xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "Curt D." wrote in message ... I am trying to have a file print in legal size if I have 56 lines filled in otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
#4
|
|||
|
|||
PRINT IF in VBA
You copied and pasted?
then you have not taught your computer how to count the row numbers yet. "Curt D." wrote in message ... I copied it and placed it in the macro but I get a syntex error, what am i doing wrong? "PY & Associates" wrote: If Row - nr 56 Then ActiveSheet.PageSetup.PaperSize = xlPaperLegal xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "Curt D." wrote in message ... I am trying to have a file print in legal size if I have 56 lines filled in otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
#5
|
|||
|
|||
PRINT IF in VBA
I guess not. The syntex error shows up on the following.
xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "PY & Associates" wrote: You copied and pasted? then you have not taught your computer how to count the row numbers yet. "Curt D." wrote in message ... I copied it and placed it in the macro but I get a syntex error, what am i doing wrong? "PY & Associates" wrote: If Row - nr 56 Then ActiveSheet.PageSetup.PaperSize = xlPaperLegal xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "Curt D." wrote in message ... I am trying to have a file print in legal size if I have 56 lines filled in otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
#6
|
|||
|
|||
PRINT IF in VBA
These two are only xlConstants for your information if you wish to change
the paper sizes. They should not remain in the code. also how does the computer (and ourselves) know how many rows your print area have? When know, adjust row_nr to suit please. "Curt D." wrote in message ... I guess not. The syntex error shows up on the following. xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "PY & Associates" wrote: You copied and pasted? then you have not taught your computer how to count the row numbers yet. "Curt D." wrote in message ... I copied it and placed it in the macro but I get a syntex error, what am i doing wrong? "PY & Associates" wrote: If Row - nr 56 Then ActiveSheet.PageSetup.PaperSize = xlPaperLegal xlPaperLetter Letter (8-1/2 in. x 11 in.) xlPaperA4 A4 (210 mm x 297 mm) "Curt D." wrote in message ... I am trying to have a file print in legal size if I have 56 lines filled in otherwise print in regular letter size. Does anyone know how to write this in VBA. help would be appreciated. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
My gridlines wont print. Even though i have gone thr print opts? | Excel Discussion (Misc queries) | |||
How can I print current row in same place on paper but not print surrounding cells??? | New Users to Excel | |||
One spreadsheet cell won't print but shows up in print preview? | Excel Discussion (Misc queries) | |||
set the print area print multiple tabs | Excel Discussion (Misc queries) | |||
Printing - Have to set print area 1 column further than necessary | Excel Discussion (Misc queries) |