Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PageBreak

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
I generate along code from access an output to excel.

Code:
recordset1
create a table in excel

recorset2
create a second table in excel

between these two recordsets I like to insert a pagebreak with vba. So I get one table on page one and the second on page 2 (in the same worksheet). What is the instruction to insert a pagebreak ?




 




Hi,

It would be a better practice to put each on a SEPARATE sheet, and then print the workbook (ie both sheets, which will be on separate pages)

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Code:
xlWorkSheet.Rows(lLastRowPageBreak).PageBreak = xlPageBreakManual

I first generate my result (output) and set then a PageBreak on a position. I don't see the difference between xlPageBreakManual and xlPageBreakAutomatic
 



VBA_Help said:
Remarks
This property can return the location of either automatic or manual page breaks, but it can only set the location of manual breaks (it can only be set to xlPageBreakManual or xlPageBreakNone).

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 



Do the research.

Then ask questions.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top