Can't set HPageBreaks

X

xL User

I've tried to set HPageBreaks using example from Help
Set ActiveSheet.HPageBreak(1).Location = ActiveSheet.Cells(row,col)
But during execution I get a run-time error 1004. If I use sintax
ActiveSheet.HPageBreak(1).Location = ActiveSheet.Cells(row,col)
then I don't get any error but in PagePreview there are no page breaks where I expect them.

How to set manual page breaks?
 
B

Bill Kuunders

One way..........
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
Regards
Bill K
 
X

xL User

Thank you. Your example helps me.
After I set
.FitToPagesTall = False
all does well :)
 

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

Similar Threads


Top