commondialog.cancelerror = true 为什么捕获不到?解决方法

commondialog.cancelerror = true 为什么捕获不到?
我在点击 "取消时 "根本不执行commondialog.cancelerror=true这条语句.请高手指出问题可能出在哪里??

------解决方案--------------------
首先你看看你的顺序
commondialog.cancelerror=true
cmmmondialog.showsave

然后就看看on error goto..
------解决方案--------------------
VB.NET code

On Error Resure Next
CommonDialog1.CancelError = True
CommonDialog1.ShowSave
If Err = cdlCancel Then
    '如果你的CancelError不设置为True的话,是不能截获cdlCancel错误滴~
End If