Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jun 2005
    Posts
    386
    Thanks
    3
    Thanked 0 Times in 0 Posts

    print individual consecutive rows (xp & 2003)

    I have a work sheet which has approximately 150 rows 15 columns wide I would like to print out. I want to keep the Print Titles Rows the same but print out on each page the individual rows. Is there any way i could print this without setting up each print job to print each row.

    Thank you

  2. #2
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: print individual consecutive rows (xp & 2003)

    Sub PrintEachRow()
    'Jim Cone - June 2005 - Select print area and run code.
    Dim rngPrint As Excel.Range
    Dim rngRow As Excel.Range
    Set rngPrint = Application.Intersect(Selection, ActiveSheet.UsedRange)

    If Not rngPrint Is Nothing Then
    ** For Each rngRow In rngPrint.Rows
    ****** If Application.CountA(rngRow) > 0 Then
    ********* rngRow.PrintOut copies:=1
    ****** End If
    ** Next
    End If
    Set rngPrint = Nothing
    Set rngRow = Nothing
    End Sub
    '---
    Jim Cone
    Portland, Oregon USA

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: print individual consecutive rows (xp & 2003)

    The following macro will insert pagebreaks after each row starting with row 2 and ending after then row you input.

    <pre>Sub PrintSectionEachRow()
    Dim lngHowMany As Long, i As Long
    lngHowMany = Application.InputBox("What is the last row?", , , , , , , 1)
    For i = 3 To lngHowMany + 1
    Cells(i, 1).Select
    ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
    Next
    End Sub</pre>


Posting Permissions

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