请教VB高手:如何保存VB程序窗体

来源:百度知道 编辑:UC知道 时间:2024/05/24 20:43:45
如何VB程序窗体通过通用对话框的形式,让用户自已决定保存位置!

With CommonDialog1
.InitDir = CurDir
.Filter = "所有文件(*.*)|*.*"
.DialogTitle = "另存为"
.ShowSave
If Dir(.FileName) <> "" Then
Dim IsReplace As Integer IsReplace = MsgBox(.FileTitle + "已经存在,覆盖它吗?", vbYesNo, "警告")
'相应的处理代码
End If
End With