+ Reply to Thread
Results 1 to 18 of 18

Add a macro to a button to print whole workbook

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Add a macro to a button to print whole workbook


    hi,
    i got a workbook, that has many pages.
    i need to insert a button with a macro, ( Print Workbook ) to scroll all the workbook and print all the sheets, but on every sheet, to stop to last value, and not to print blank pages.
    or,
    a dropbox to ask me which pages to print is even better, but still every sheet up to last value.

    i hope i did explain it well, but if you need the workbook, let me know to upload it.

    Many thanks in advance.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Add a macro to a button to print whole workbook

    Check out Jwalk's example

    http://www.j-walk.com/ss/excel/tips/tip48.htm

  3. #3
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by davesexcel View Post
    hi, thanks, i give it a go, and i hope i can modify it if needed. ( not that i'm an expert, but i give it a go)

  4. #4
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by davesexcel View Post
    hi again, i did try this code, but send to the printer even blank pages.
    is a way to ask to print only rows with data ?

    thats the code:
    Last edited by davesexcel; 04-20-2013 at 07:55 AM.

  5. #5
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    any help??
    please?

  6. #6
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    anyone to help me with this?

  7. #7
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    Use this code before printing code...


    Please Login or Register  to view this content.
    Last edited by abduljaleel.mca; 04-22-2013 at 04:52 AM.

  8. #8
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by abduljaleel.mca View Post
    Use this code before printing code...


    Please Login or Register  to view this content.

    hi again, and thanks for your help.
    i upload the same sheet we was working on before.
    where this code goes? can you have a look when you can?

    also, the search you put on the sheet works fine, but if you input nothing on the search boxes, or if you cancel the search, deletes all the prices from the sheets, i'm sure is an easy fix
    thanks in advance

    Project.xlsm

  9. #9
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    Use this updated file...
    I am looking in to your 2nd issue...
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    thank you i wait for it.

  11. #11
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by abduljaleel.mca View Post
    Use this updated file...
    I am looking in to your 2nd issue...
    also, the search not having a function: "Not Found Product Name" so i know if found it or not.

    sorry to truble you

  12. #12
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    Please let me know if this file solves all of your issues..
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by abduljaleel.mca View Post
    Please let me know if this file solves all of your issues..
    hi, thanks for the search, now is working ok.

    printing, is only prints now the first page of the sheet, from a1 to I3.
    maybe because is the cells merged, but not printing the whole document.

  14. #14
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    I don't have the printer to check the code before sending it to you ...Let me check the code again...

  15. #15
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    change this line

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Thanks, works perfect. !!
    just a question before i close the thread, do i need to leave the tab "dialog1" on the workbook, or is ok to delete it?

    thanks

  17. #17
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Add a macro to a button to print whole workbook

    U can delete it once your process is over...

  18. #18
    Registered User
    Join Date
    04-18-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Add a macro to a button to print whole workbook

    Quote Originally Posted by abduljaleel.mca View Post
    U can delete it once your process is over...
    thank you !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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