I am using a CommonDialog Control to Open & Save Files but can not establish if the Cancel Button was Clicked, I have tried an ErrorHandler with an On Error GoTo, and an ErrorHandler with the On Error Resume Next statement, but if the Controls CancelError property is set to True, the program stops at the CommonDialog.ShowOpen with a message box telling me about the Error.
The Error Number = 32755 but I cant even trap it with code
'FAILED CODE
If Err.Number = 32755 Then
Cancel Was Clicked
Else
Open Was Clicked
End If
'FAILED CODE
On Error GoTo ErrorHandler
CommonDialog.ShowOpen
filename = CommonDialog.FileName
ErrorHandler:
Cancel was Clicked
Exit sub
If the Controls CancelError property is set to False, then no Errors occure, but I can not seperate the Open or Cancel operations to be handled.
Is there a way of using CommonDialog Error constants, Eg.
cdlCancel. to assume a Canceled option.
Regards MARK
The Error Number = 32755 but I cant even trap it with code
'FAILED CODE
If Err.Number = 32755 Then
Cancel Was Clicked
Else
Open Was Clicked
End If
'FAILED CODE
On Error GoTo ErrorHandler
CommonDialog.ShowOpen
filename = CommonDialog.FileName
ErrorHandler:
Cancel was Clicked
Exit sub
If the Controls CancelError property is set to False, then no Errors occure, but I can not seperate the Open or Cancel operations to be handled.
Is there a way of using CommonDialog Error constants, Eg.
cdlCancel. to assume a Canceled option.
Regards MARK