Results 1 to 2 of 2

Thread: [RESOLVED] MS common Dialog

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Posts
    216

    Resolved [RESOLVED] MS common Dialog

    i was using MS common Dialog box in my application i want to know how can i detect if some 1 pressed "Cancel" when a Open Dialog in open or save Diallog

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: MS common Dialog

    You need to set the CancelError property and create some error handler:
    Code:
    Private Sub Command1_Click()
    
    On Error GoTo ErrHandler
    
        With CommonDialog1
            .CancelError = True
            .ShowSave
        End With
        
        Exit Sub
    
    ErrHandler:
    
        MsgBox "User has cancelled the save operation."
        Err.Clear
        Exit Sub
    
    End Sub

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