+ Reply to Thread
Results 1 to 6 of 6

Print only current page! Not all 47 pages when print button is pressed?

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Print only current page! Not all 47 pages when print button is pressed?

    Hello Everyone,

    I have made a sheet that has been divided up into 47 pages. Each page has a macro on a button that when the button is pressed will only print the current page. The problem is that the users are not using the button with the macro on it but the tool bar print button that by default prints every page (47 in total!). They only ever need to print the current page and never all pages! Is there any way that the print button on the tool bar can be configured to only print the current page in view when it is clicked on? Perhaps some code that will be activated when the print icon is pressed?

    Thank you very much for any help

    Margate

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Print only current page! Not all 47 pages when print button is pressed?

    Can you show the code for your 1st and 47th print macros?

  3. #3
    Forum Contributor
    Join Date
    01-02-2007
    Location
    Australia NSW
    MS-Off Ver
    2013
    Posts
    494

    Re: Print only current page! Not all 47 pages when print button is pressed?

    Set the print range to the required cells and when printing is called only the cells included in the set print range will be printed.
    Please Login or Register  to view this content.
    To disable the print button view here http://answers.microsoft.com/en-us/o...b-68b599b31bf5
    Last edited by coreytroy; 03-28-2013 at 11:36 PM.

  4. #4
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Print only current page! Not all 47 pages when print button is pressed?

    Hello AlphaFrog,

    The code is below:
    There are actually only 22 print areas. I had to do it this way because the in between pages have no information!
    Thank you for your help.



    Sub PrintPageOne()
    ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
    :=True
    End Sub



    Sub PrintPageTwentyTwo()
    ActiveWindow.SelectedSheets.PrintOut From:=43, To:=43, Copies:=1, Collate _
    :=True
    End Sub

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Print only current page! Not all 47 pages when print button is pressed?

    If you put this in the ThisWorkbook code module, it will show a message when the worksheet is printed and cancel the print.
    Please Login or Register  to view this content.
    Then change your print macros like this so they don't trigger the message.
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Print only current page! Not all 47 pages when print button is pressed?

    Hello Alpha Frog,

    Thank you very much (again) it worked exactly how I wanted it to

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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