+ Reply to Thread
Results 1 to 4 of 4

Print 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

    Print 10 rows per page - need help finishing macro

    Hi!

    I have a few documents I want to print that are 200+ rows each. I want to print 10 rows per page plus the header row. Is there a quick macro I can use to do this? 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 Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

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

    Hi zarafe,

    Are the 10 pages each (every) tab in the workbook or a set of tabs, which for the later will require you to provide the tab names.

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

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

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

    I have 10 different workbooks open right now. Each workbook has a different number of cells I want to print so I figured I'd just run the macro in each one. I just want 10 cells plus the header per printed page. I can either have a macro that auto prints or a macro that just copies 10 rows to each sheet (plus the header) then I can print it all at once. Either way works, I just can't figure it out!

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

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

    Though you still haven't said what the tab name to be printed from each workbook is, try this:

    Please Login or Register  to view this content.
    Just change the rngMyRange and wstMySheet variables to suit.

    HTH

    Robert

+ 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. 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
  2. Print rows at bottom of each page
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2011, 04:39 PM
  3. macro not finishing task
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-29-2007, 07:32 PM
  4. How to print 2 worksheets (different col/rows) on the same page
    By Don Guillett in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  5. How to print 2 worksheets (different col/rows) on the same page
    By lindag in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM

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