Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: How to create a header row???

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Dublin, Ireland
    Posts
    10
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm trying to split up a sheet using page breaks:

    Sub PageBreaker()

    Dim rFound As Range

    Set rFound = Cells.Find("Marker", LookIn:=xlValues)
    If Not rFound Is Nothing Then
    firstAddress = rFound.Address
    Do
    With rFound.EntireRow
    ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=rFound.Offset(3, 0)
    End With
    Set rFound = Cells.FindNext(rFound)
    Loop While Not rFound Is Nothing And rFound.Address <> firstAddress
    End If


    End Sub

    and that's working fine !

    But when I add the following code in the innermost with statement to create a row where I can add column headers the whole thing goes into a continuous loop :

    rFound.EntireRow.Insert

    If I get this working how do I add the same text in the header rows. Something like this?? But how do I work it for each newly inserted row??

    Range("B*").Select
    ActiveCell.FormulaR1C1 = "Column B"

    I don't know how to get the cell references right.

    Please Help !!!!!!!!

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi
    Post is trash...
    My post was
    Tom

    [ This Message was edited by: TsTom on 2002-04-23 02:10 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •