When i open a Common Dialog control and then click Cancel it will gimma an error.
I just forgot the Cancel statment so if the user clicks cancel it will abort..
tnx
Printable View
When i open a Common Dialog control and then click Cancel it will gimma an error.
I just forgot the Cancel statment so if the user clicks cancel it will abort..
tnx
If the CancelError is set to True, it will cause an error when Cancel is clicked(duh:rolleyes:). There is no abort, you just trap the error.Quote:
Originally posted by Stiletto
When i open a Common Dialog control and then click Cancel it will gimma an error.
I just forgot the Cancel statment so if the user clicks cancel it will abort..
tnx
:)
You need to change the CancelError property to true for the common dialog, then use error handing. I think the error code for the cancel button is 32755. So put some EH code like this:
VB Code:
On Error GoTo ErrLine CD1.ShowOpen 'do your CD code here Exit sub ErrLine: if Err.Number <> 32755 then msgbox "Error! " & err.description end if
Yup.
This works even if CancelError=False