• print individual consecutive rows (xp & 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » print individual consecutive rows (xp & 2003)

    Author
    Topic
    #453837

    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

    Viewing 1 reply thread
    Author
    Replies
    • #1125109

      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

    • #1125111

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

      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
    Viewing 1 reply thread
    Reply To: print individual consecutive rows (xp & 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: