View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
nope nope is offline
external usenet poster
 
Posts: 17
Default PageBreak-broke?

just there is more to goon here....

I determined where the pagebreaks should occur by setting a variable.
Everything seems to work using

ActiveSheet.ResetAllPageBreaks
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Range("A" &
PB(2))
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Range("A" &
PB(3))
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Range("A" &
PB(4))
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=Range("A" &
PB(5))


I just don't see any of the pagebreaks in printpreview or anywhere,
They are there but they aren't...

I used to check...

Sub whereisPB()
Dim test As String
test = ActiveWindow.SelectedSheets.HPageBreaks(2).Locatio n.Address
End Sub

to check each one HPageBreaks(3) etc...


Sure i am missing something simple.
Thank You
ScottD