+ Reply to Thread
Results 1 to 4 of 4

Print Pages Based On Cell

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-03-2016
    Location
    Sydney, Australia
    MS-Off Ver
    MS 365
    Posts
    128

    Print Pages Based On Cell

    Hi there,

    Is there a macro to print pages based on the number in a cell?

    I already have a formula that calculates how many cells contain data. I want a commandbutton that prints from the pages shown in two cells.

    E.g.
    A3 = 1
    A4 = 5
    When I click the commandbutton, it automatically prints pages 1 to 5.

    OR

    A3 = 10
    A4 = 12
    When I click the commandbutton, it automatically prints pages 10 to 12.

    I've already got the printer set up properly, so if possible, I'd rather the print window not appear. As soon as the button is clicked, the nominated pages automatically print.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Print Pages Based On Cell

    something like this?

    ActiveSheet.PrintOut From:=Range("A3"), To:=Range("A4"), Copies:=1, Collate:=True, IgnorePrintAreas:=False
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    10-03-2016
    Location
    Sydney, Australia
    MS-Off Ver
    MS 365
    Posts
    128

    Re: Print Pages Based On Cell

    Thanks humdingaling but unfortunately that code didn't work.

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Print Pages Based On Cell

    Thanks humdingaling but unfortunately that code didn't work.
    Works for me

    Are you on the tab you want printed? If so what's in cells A3 and A4? Are any error messages produced? How many pages does print preview (Ctrl + P) say there are to print?

    Robert
    Last edited by Trebor76; 07-26-2017 at 06:23 AM.
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

+ 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: 1
    Last Post: 03-24-2016, 05:28 PM
  2. Replies: 0
    Last Post: 09-02-2014, 12:59 PM
  3. [SOLVED] Print "X" number of pages based on a cell value.
    By Spencerk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2014, 07:46 PM
  4. Print pages based on time in cell.
    By Macfool in forum Excel General
    Replies: 0
    Last Post: 07-11-2012, 01:25 PM
  5. [SOLVED] Macro to print number of pages based on cell
    By Webbers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-24-2012, 02:15 PM
  6. print pages based on number in cell
    By lpratt in forum Excel General
    Replies: 3
    Last Post: 01-10-2012, 08:08 PM
  7. Print number of pages based on cell value
    By Rene Pronk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2011, 07:46 AM

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