View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Pagebreaks are not made

Jos,
On the Page setup,do you have the Scaling set to "Fit To" ?

NickHK

"Jos Vens" wrote in message
...
Hi,

I have a problem to establish horizontal pagebreaks for my worksheet.

The PrintArea is set from cell A1 to cell M300. I hide rows if they may

not
be seen.

this is the code I use:

sLijst.HPageBreaks.Add Befo=sLijst.Cells(vRow, 1)

where sLijst is the reference to the worksheet and vRow is the row

(integer
< 300) before which the pagebreak must be established. I make the breaks

in
a loop where vRow is added by 40 each time. No breaks are made.

Thanks for your help
Jos Vens