Results 1 to 4 of 4

Thread: Next Question: It's about common dialog and it's EASY

  1. #1

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268

    Question

    How can I tell if they press "Cancel"?
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Set the CancelError property to true. Add Error handeling code and test if Err = cdlCancel.
    Code:
    On Error Resume Next
    With CommonDialog1
        .CancelError = True
        .ShowOpen
        If Err = cdlCancel Then
            Exit Sub 'the user pressed Cancel so bail out
        End If
        'the user pressed OK
    End With
    Good luck!

  3. #3
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    set the CalcelEror poperty to true, then an error will raised if cancel is selected, set up an error trap to catch it.

    Damn, i was beaten to it.

  4. #4

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    Wow, I've been here for a while and I've never seen you before Joacim.

    Over 700 posts...
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

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