Results 1 to 3 of 3

Thread: How 2 cancel a CommonDialog1.ShowPrinter

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100

    Unhappy

    Howdi..

    I'm trying to catch if a user press the cancel button in the ShowPrinter dialog but I can't figure it out...

    Anyone that knows something about it???

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655

    Talking

    Here is a simple way:

    Code:
    On Error GoTo CancelCheck
    CommonDialog1.CancelError = True
    CommonDialog1.ShowPrinter
    
    Exit Sub
    CancelCheck:
    MsgBox "They clicked cancel"
    This example sets the commondialog control's CancelError property to true making the dialog give an error when a user clicks cancel. In the
    Code:
    CancelCheck
    error handler, do what ever you wish. Call another sub or function, display a msgbox as I did, or whatever. Hope this helps.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    ho ho.. Thanks alot.

Posting Permissions

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



Click Here to Expand Forum to Full Width