VPageBreak

J

jgett

I saw a couple of other posts regarding VPageBreak but I thought I'
give it another try. My appologies for possibly beating a dead horse.

For some reason this does nothing:
ActiveSheet.VPageBreaks(1).Location = ActiveSheet.Range("H1")

The code does not produce an error but if I check the address o
VPageBreaks(1) before and after this code it stays the same (F1).

Any help is appreciated
 
J

jeff

Hi,

I think you have to use the .Add method not .Location.

from Excel Help:

This example adds a horizontal page break above cell F25
and adds a vertical page break to the left of this cell.

With Worksheets(1)
.HPageBreaks.Add .Range("F25")
.VPageBreaks.Add .Range("F25")
End With

jeff
 
Top