+ Reply to Thread
Results 1 to 4 of 4

Canceling a Print Job

  1. #1
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Canceling a Print Job

    Hi,

    I am using the dialog box
    Please Login or Register  to view this content.
    to start a print job so I can select the printer I want to use.

    The macro runs printouts from three seperate worksheets, but I only show the dialog box once, as this sets the printer for the rest of the printouts.

    If I select cancel from the above dialog box, it stops the print of the first page, but not subsequent pages.

    What can I put in after the dialog box to exit the sub and not print the rest of the pages?

    Thanks in advance (yet again!).

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Canceling a Print Job

    Need to see the rest of the code.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    09-29-2011
    Location
    ɹǝpun uʍop
    MS-Off Ver
    365
    Posts
    250

    Re: Canceling a Print Job

    Quote Originally Posted by shg View Post
    Need to see the rest of the code.
    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Canceling a Print Job

    The Show returns False if all you do is change (or not change) the printer (rather than print). I don't know of a way to distinguish between that and the user pressing Cancel, which also returns False. Perhaps someone else does.

    In the alternative, you could use a MsgBox to ask the user whether to proceed with printing.

+ 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. canceling sorting function
    By Vogelmann in forum Excel General
    Replies: 2
    Last Post: 10-24-2012, 07:49 AM
  2. Loop in canceling of event
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2011, 07:14 PM
  3. Canceling out zeros
    By esupply in forum Excel General
    Replies: 5
    Last Post: 03-12-2010, 05:07 PM
  4. PRINT macro: prevent error when canceling at InputBox level
    By zusammen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-19-2009, 07:52 AM
  5. Canceling items from a sheet
    By Skiman in forum Excel General
    Replies: 9
    Last Post: 03-02-2008, 09:12 PM

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