Pagebreak property

N

Nitin Pai

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.
 
N

Nasir.Munir

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 Before:=ActiveCell // or
your cell location
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top