Results 1 to 10 of 19

Thread: A simple printing pages depending on cell value

Threaded View

  1. #1

    A simple printing pages depending on cell value

    I hope someone can help because this is driving me absolutely bonkers. This should be something so easy yet....

    I am trying to print a number of pages depending on a cell value which is a value of a formulae

    Sub PRINT_GENERIC()
    Code:
    Sheets("GENERIC").Select
    
    a = Range("Z1").Value
    ActiveWindow.SelectedSheets.PrintOut From:=1, To:=a, Copies:=1
    Sheets("MAINSHEET").Select
    
    
    End Sub



    The whole worksheet has page breaks in it to make 40 pages. Every time the above macro is run it will print 40 pages regardless of the value of (a).

    What am I doing wrong?

    Thanks
    Last edited by antonywalsh; 2012-05-08 at 03:56 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •