+ Reply to Thread
Results 1 to 8 of 8

to print specific data by button

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    to print specific data by button

    Hi, i have attached a file. there are several invoices separated by empty rows. when i go to print on a single invoice on A4 paper then it makes out of order as invoice size are not same in rows, I want such code to print one empty row to next empty row on a page, then again next empty row to another next empty row on a another page, this will continue to last invoice in this sheet.. for example u can see the attachement.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-26-2008
    Location
    Birmingham, UK
    MS-Off Ver
    All versions up to 2010
    Posts
    1,025

    Re: to print specific data by button

    Hi Amerjeet
    You need to insert manual page breaks between each invoice.
    1. Position your cursor on the row beneath where you want the page break to appear.
    2. Click on Page Layout.
    3. Click Breaks followed by Insert Page Break.
    Good luck.
    Tony

  3. #3
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: to print specific data by button

    hi ARGK,

    thanks for your reply. but problem is i have a sheet over 10000 plus rows and i dont think to do manually is a only way if possible in macro andanother thing is only empty rows are identified as next invoices., you can also have a look in attached file. hope any guy will help me out

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: to print specific data by button

    Hi amerjeet.it

    Try this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: to print specific data by button

    Hi jaslake,


    Thanks for reply.

    it's not working with attached file... please see the problem

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: to print specific data by button

    Hi amerjeet.it

    That's strange...I actually tested the Code on the File we previously worked on and it performed as expected. But, you're correct, it did not do as expected on the Fie attached to this Thread.

    Modified Code (tested on attached file)
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-22-2013
    Location
    India
    MS-Off Ver
    2010
    Posts
    87

    Re: to print specific data by button

    Hi,
    jaslake

    the code you provided working perfectly.

    oh thanks a lot.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: to print specific data by button

    You're welcome...glad I could help.

+ 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. How to set command button to print to specific network printer
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-21-2013, 12:20 AM
  2. VBA to print specific data sets
    By ndfrose in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-01-2011, 10:58 AM
  3. How to print specific data from a sheet.
    By knaps in forum Excel General
    Replies: 2
    Last Post: 02-10-2010, 06:11 AM
  4. [SOLVED] print report with data from specific worksheet
    By JG_HILL in forum Excel General
    Replies: 1
    Last Post: 05-14-2005, 03:06 PM
  5. [SOLVED] copy/print specific data
    By Anthony in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2005, 07:06 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