+ Reply to Thread
Results 1 to 6 of 6

Print pages depending on range

  1. #1
    Registered User
    Join Date
    03-24-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    8

    Print pages depending on range

    I hope that some one can help I am attempting to do either of the 2 functions below and neither are working. I would like to either print a number of pages depending on a cell value or print a range of cells depending on a cell value. The worksheet is made up of 40 pages and every time it still prints the 40 pages regardless of wants in the cells value.

    Any help will be greatly appreciated.

    Please Login or Register  to view this content.
    OR

    Please Login or Register  to view this content.
    The page is set up to 40 pages long and it does not matter what I enter it still prints the 40 pages. If i set the range to a static number it will print the range but if I have to take the value from a cell it still only prints 40 pages. I would like to be able to print the number of pages depending on cell value,

    Anyone's help would be appreciated.

    Thanks

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,790

    Re: Print pages depending on range

    For your second macro I would suggest you change the line

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Alf

  3. #3
    Registered User
    Join Date
    03-24-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Print pages depending on range

    Quote Originally Posted by Alf View Post
    For your second macro I would suggest you change the line

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Alf
    Thanks for that but it still comes up with an error saying range of object global failed.

    Regards

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,790

    Re: Print pages depending on range

    Does this work?

    Please Login or Register  to view this content.
    Alf

  5. #5
    Registered User
    Join Date
    03-24-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Print pages depending on range

    Alf

    Unfortunately no

    Set myRange = Range("A1:U" & Range("AD2"))
    Still coming up with a fail. (range of object. global failed)

    I thought that printing a number of pages depending on a cell value or printing a range depending on a cell value would be quite an easy task. This seems to be posing big problems.

    Regards

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,790

    Re: Print pages depending on range

    Sorry, I'm out of ideas. Hopefully somebody else can help you.

    Alf

+ 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