From: Peter T on
Sub test()
Dim hp As HPageBreak, vp As VPageBreak
Dim ws As Worksheet

Set ws = Worksheets(3)
With ws
' .Range("a100, z1") = 1
Set vp = .VPageBreaks(1)
Set hp = .HPageBreaks(1)
' .Range("a100, z1").Clear
End With

With vp.Location
Debug.Print .Address, .Column, .Left
End With

With hp.Location
Debug.Print .Address, .Row, .Height
End With

End Sub

Regards,
Peter T


"Dennis Macdonald" <bandwood1(a)gmail.com> wrote in message
news:d4c22256-499d-4457-b2c0-9877790515e7(a)a39g2000prb.googlegroups.com...
> Yes, sometimes one and sometimes many per page -this iis why I needed
> the page sizes.
>
> I have been working on this a lot more and I think using VPageBreaks
> and HPageBreaks may be a better solution.
>
> Excel shows the page markers on the screen with the small dashed line
> both vertically and horizontally.
>
> Do you know how to determine which cell these are on via VBA?
>
> Thanks,
> DEnnis.
>


First  |  Prev  | 
Pages: 1 2
Prev: Stop duplicate record
Next: Conditional formatting?