+ Reply to Thread
Results 1 to 8 of 8

Button To Print Specific cell Range On One Sheet In Print Selection

  1. #1
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Button To Print Specific cell Range On One Sheet In Print Selection

    Hello

    i am looking for code that when pressed it prints a specif selected range e.g A1 to H41 of the sheet

    Would the code be able to make sure "print selection" and "print sheet on one page" options are selected so that the print out is one full A4 page? so that the only user input would be pressing the button

    the button could be in a separate column of the same sheet , maybe column J

    Regards

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    3,522

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    Please Login or Register  to view this content.
    Last edited by jolivanes; 11-21-2019 at 05:35 PM. Reason: Fix Orientation setting

  3. #3
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    Hello, thank you for your reply, when the code was implemented it printed out a blank page. I tried to change the Sheet1 reference to match the sheet name of the sheet in question (custom named AlwaysShow). The error.... Runtime error 9, Script out of range

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    3,522

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    Attach your workbook without personal data.

  5. #5
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    434

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    Ensure that the range you want to print is NOT BLANK and also that sheet name exists on the workbook.

    This is one that will trigger Runtime error 9, otherwise code seems straight forward and runs properly.
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    3,522

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    If the Button is on the sheet that you want to print and the Range you mentioned in your first Post has data, like saravnepali mentioned, you can use
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    thank you .....got it working now, silly mistake

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    45,442

    Re: Button To Print Specific cell Range On One Sheet In Print Selection

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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. VBA code to have print button and print the required area in sheet.
    By Ishwarind in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-09-2016, 03:54 AM
  2. Command Button that allows user to email and print specific sheet
    By KT99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2014, 11:06 AM
  3. Disabled print toolbar and menu but Print Macro button cannot print also...
    By zein97 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2014, 01:42 PM
  4. Set print area of selected range then print preview if ok then print the document!
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 07:10 AM
  5. VBA to set print range, open box asking for print qty, print, then redefine print area
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 06:43 PM
  6. Print Button to print UserForm for multi-sheet
    By smartcard in forum Excel General
    Replies: 12
    Last Post: 04-29-2010, 07:47 AM
  7. Replies: 1
    Last Post: 11-24-2005, 07:29 AM

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