View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Jos Vens Jos Vens is offline
external usenet poster
 
Posts: 52
Default Pagebreaks are not made - Solution found!!! Thanks a lot!

Hi,

you're right: when I remove the fit to-statements, everything works fine!
Why didn't it work at first? Because I had to manually reset the option in
page setup because my code didn't do so.

Thanks for your help!!!

Jos Vens


"NickHK" schreef in bericht
...
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