+ Reply to Thread
Results 1 to 3 of 3

Print Rows Based on Input

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    Tallahassee
    MS-Off Ver
    Excel 2010
    Posts
    30

    Print Rows Based on Input

    I have the following macro that prints the top row whenever I print a worksheet:

    With ActiveSheet.PageSetup
    .PrintTitleRows = "$1:$1"
    End With

    Most of the time the row I want to repeat is either 6 or 11. Row 1 usually worksheet titles and not header data.

    Can someone please think of a way where I can get a message box or input box to prompt me for a row number and then incorporate that number for the row number in the macro above?

    Thank you.

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Print Rows Based on Input

    Try This..

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Registered User
    Join Date
    01-10-2013
    Location
    Tallahassee
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Print Rows Based on Input

    I could not get this to work. I hope you don't mind helping me a bit further.

    I ran the macro with your edits but it did not fill the row to repeat at top box under the sheet tab in the Page Setup dialog box. Your code does generate an input box and it does populate it with the rows I select with the mouse but it does not repeat the rows at top when I print.

    I am using Excel 2013 so I get the Page Setup dialog box by going to the Page Layout ribbon and clicking the small arrow in the Page Layout group.

    Thank you.

+ 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. Replies: 0
    Last Post: 06-17-2013, 07:25 PM
  2. message input box returns lines/rows based on the input
    By excelandclark in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2013, 07:35 PM
  3. [SOLVED] Count Rows Based On User Input & Trigger Print Of Pages Out Of Count Result
    By wliang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 02:45 AM
  4. unhide/hide rows based on value input
    By whoosh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2009, 11:25 PM
  5. [SOLVED] Print certain data based upon input box
    By Coal Miner in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2006, 01:50 PM

Tags for this Thread

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