ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pagebreak property (https://www.excelbanter.com/excel-programming/386564-pagebreak-property.html)

Nitin Pai

Pagebreak property
 
Here is my problem. I am not able to set a manual pagebreak property in
excel using VB.
I have Excel 2003 and VB 6.0 with 11.0 excel object library. I have reduced
the columnwidth to 2.5
I have set the page setup to Landscape I am using the command

Worksheets(1).Columns("AZ").Pagebreak = xlPagebreakmanual

but it doesnt allow me to set the pagebreak there. It sets one pagebreak at
AJ and the other one at AZ which I dont want.




[email protected]

Pagebreak property
 
On Mar 30, 1:14 pm, "Nitin Pai" wrote:
Here is my problem. I am not able to set a manual pagebreak property in
excel using VB.
I have Excel 2003 and VB 6.0 with 11.0 excel object library. I have reduced
the columnwidth to 2.5
I have set the page setup to Landscape I am using the command

Worksheets(1).Columns("AZ").Pagebreak = xlPagebreakmanual

but it doesnt allow me to set the pagebreak there. It sets one pagebreak at
AJ and the other one at AZ which I dont want.


ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell // or
your cell location



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

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