ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Problem (https://www.excelbanter.com/excel-programming/414377-printing-problem.html)

Jay

Printing Problem
 
Thanks in advance

Problem: Following code would print only a header portion.
This is a portion of codes that puts some data into "Statement" worksheet
and print it upon different data.
For each -----
Worksheets("Statement").Range("A1", "AN4").PrintOut From:=1, To:=1
Next

On the other hand, manual File Print menu prints everything in a
worksheet.

I would like to print everthing with a VBA code.

Thanks

Jae



JLGWhiz

Printing Problem
 
I am not sure what you are asking, but the syntax for printing the entire
sheet is:

Sub prt()
ActiveSheet.PrintOut
End Sub

Or if you want to use the sheet name then:

Sub prt2()
Sheets("Statement").PrintOut
End Sub

The code you posted only selects a range in four rows for printing.

"Jay" wrote:

Thanks in advance

Problem: Following code would print only a header portion.
This is a portion of codes that puts some data into "Statement" worksheet
and print it upon different data.
For each -----
Worksheets("Statement").Range("A1", "AN4").PrintOut From:=1, To:=1
Next

On the other hand, manual File Print menu prints everything in a
worksheet.

I would like to print everthing with a VBA code.

Thanks

Jae




All times are GMT +1. The time now is 11:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com