Posts by Richie(UK)


    My first comment in the post above was not a serious one - unfortunately the smiley dropped to the next line so you may have missed it. (That'll teach me to preview my post next time! ;) ).

    To make matters worse, I've looked into the use of 'BuiltinDocumentProperties' through VBA and it appears that certain properties aren't supported across the whole Office range. In particular Excel does not maintain the 'Total Editing Time' property. Nor the 'Last Save Time' property. :(


    Looks of dubious benefit to me anyway - why is the last edited time and date BEFORE the date it was created?


    Slightly more helpfully - have you looked at 'BuiltinDocumentProperties Property' in the VBE Help files?

    Hi DeZaStR,

    See if you have any joy with the following:
    <pre>Sub InsertPBs()
    Dim rngMyRange As Range, rngCell As Range

    With Worksheets("Sheet1")
    Set rngMyRange = .Range(.Range("B1"), .Range("B65536").End(xlUp))
    'the range to work with
    For Each rngCell In rngMyRange
    'loop through the range
    If rngCell.Value <> rngCell.Offset(1, 0).Value Then
    .HPageBreaks.Add Before:=rngCell.Offset(1, 0)
    End If
    End With

    End Sub</pre>HTH