commondialog怎么样区分是单击了“确定”还是“取消”
使用commondialog另存为对话框
怎样判断是按了“确定”还是“取消“按钮呢?
[解决办法]
Option ExplicitPrivate Sub Command1_Click() On Error GoTo ErrHandler CommonDialog1.CancelError = True '<- CommonDialog1.ShowSave MsgBox "保存到 " & CommonDialog1.FileNameExitEntry: Exit SubErrHandler: If Err.Number = 32755 Then '<- MsgBox "取消" Else MsgBox Err.Number & vbCrLf & Err.Description, vbCritical End If Resume ExitEntryEnd Sub