下面这个代码改成备份外部数据源mdb格式应该怎样修改了,麻烦老师指导下
备份
Dim dlg As new SaveFileDialog
dlg.Filter = "压缩文件|*.zip"
dlg.FileName = format(Date.now, "yyyyMMddHHmmss") & ".zip"
If dlg.ShowDialog = DialogResult.OK Then
FileSys.CopyDirectory(ProjectPath, "d:\test")
Dim zip As New zipFile
zip.Create(dlg.FileName)
zip.AddFolder("d:\test")
zip.Close()
End If
还原
Dim dlg As new OpenFileDialog
dlg.Filter = "压缩文件|*.zip"
If dlg.ShowDialog = DialogResult.OK Then
Dim zip As New zipFile
zip.Open(dlg.FileName)
zip.ExtractAll(ProjectPath)
zip.Close()
msgbox("已恢复")
'Application.restart
End If