+ Reply to Thread
Results 1 to 3 of 3

Printing 10 rows per page - need help finishing macro

  1. #1
    Registered User
    Join Date
    05-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    14

    Printing 10 rows per page - need help finishing macro

    Hi!

    I have a few workbooks each with around 60-200 rows. I want to print the document but I only want 10 rows per page plus the header row. I don't need to save the different sheets although it would be great if I can just make as many sheets as needed each with 10 rows and the header.

    I found this one below but it is only for 1 row per page and I am struggling to fix it for 10 pages! Thanks for your help.

    Sub PrintMeOnly()
    Application.ScreenUpdating = False
    Dim i As Long
    Dim i2 As Long
    Dim i3 As Long
    Dim c As Long
    Dim tmpRow1 As Variant
    Dim tmpMoreRows(60) As Variant
    c = 1
    Sheets("Senate + above").Activate
    tmpRow1 = Rows("1:1").Value
    For i = 1 To 60
    c = c + i
    tmpMoreRows(i) = Rows(c).Value
    c = 1
    Next
    Sheets("Sheet2").Activate
    For i2 = 1 To 7

    Range("A1").Value = ""
    Range("A1").Value = tmpRow1


    Range("A2").Value = ""
    Range("A2").Value = tmpMoreRows(i2)


    Sheets("Sheet2").PrintOut
    Next
    Range("A1").Value = ""
    Range("A3").Value = ""
    Sheets("Senate + above").Activate
    Application.ScreenUpdating = True
    End Sub

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,652

    Re: Printing 10 rows per page - need help finishing macro

    This puts a horizontal page break at every 10th row and sets row 1 as each printed page's header row.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    05-02-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Printing 10 rows per page - need help finishing macro

    Thanks I appreciate it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Print 10 rows per page - need help finishing macro
    By zarafe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2013, 07:40 PM
  2. Hide Column & Print page Macro printing blank page?!
    By Margate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2013, 03:59 PM
  3. Replies: 0
    Last Post: 12-14-2011, 04:20 PM
  4. Printing - different rows at top for each page
    By kestrel in forum Excel General
    Replies: 1
    Last Post: 07-25-2006, 08:15 AM
  5. Printing rows on every page
    By SusieQ in forum Excel General
    Replies: 1
    Last Post: 02-01-2006, 01:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1