Cancel button in Save Dialog box

albertlse
03-05-2003, 08:23 PM
I add a Save Dialog box in my form. whenever i call the save dialog box, and if I press the Cancel button, it will show error message. how can i handle this button?

Machaira
03-05-2003, 09:55 PM
Set the CancelError property to true and trap for the error cdlCancel.

albertlse
03-05-2003, 10:27 PM
I'm newbie to VB. Can you show me the code

BostjanK
03-06-2003, 02:39 AM
On Error resume Next
Dim s FileName As String

comDialog1.CancelError = True
comDialog1.ShowSave

If Err = cdlCancel Then
sFileName = ""
Else
sFileName = comDialog1.FileName
End If


Changed [php] tags

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum