Is this question about displaying the default pagebreaks in excel?
You can try following:
Application.ActiveWindow.View = xlPageBreakPreview
Application.ActiveWindow.View = xlNormalView
Once gone it to PageBreak view and come back to normal view
it continues to show the page breaks.
In your case, of course, since you are doing it thorough
VB
you can refer to your excel application object istead of
Application.
Sharad
"microstoc" wrote in message
lkaboutsoftware.com...
I am automating Excel from VB6.
I ran into a similar problem using your method.
I have just stumbled upon this method that seems to work.
'select a cell, make it active
Range("A14").Select
'insert pagebreak in the active cell
ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCells
Does it work for you?