View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] Nasir.Munir@dal.ca is offline
external usenet poster
 
Posts: 37
Default 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