下面是CommonDialog1的常用例子
With CommonDialog1
.DialogTitle = "命令名"
.Filter = "可执行文件(*.exe;*.com)|*.exe|所有文件 (*.*)|*.*"
.CancelError = True
.FileName = "DefaultName"
.ShowSave
If Err.Number <> cdlCancel Then
'在此可以加入你点击确定后想要实现的程序,如
text1.Text = CommonDialog1.FileName
End If
End With