Private Sub Command1_Click()
'确认数据备份
Dim s
As Strings =
MsgBox("准备好了吗?", vbYesNo + vbQuestion, "提示")
If s = vbNo
ThenExit SubEnd IfOn Error GoTo errprompt
Me.MousePointer = 11
If Dir(Text1.Text & ":/数据备份", vbDirectory) = ""
ThenMkDir Text1.Text & ":/数据备份"
Set bf =
CreateObject("Scripting.FileSystemObject")
bf.CopyFile App.Path & "system.dll", Text1.Text & ":/数据备份/system" &
Date & ".dll"
Me.MousePointer = 0
s =
MsgBox("数据已备份完毕!", vbInformation, "提示")
errprompt:
Me.MousePointer = 0
Select Case Err.Number
Case 57
s =
MsgBox("磁盘已满!", vbCritical, "提示")
Case 70
s =
MsgBox("磁盘写保护!请回到原文件进行复制system.dll", vbCritical, "提示")
End SelectElseOn Error GoTo errprompt1
Set bf =
CreateObject("Scripting.FileSystemObject")
bf.CopyFile App.Path & "system.dll", Text1.Text & ":/数据备份/system" &
Date & ".dll"
Me.MousePointer = 0
s =
MsgBox("数据已备份完毕!", vbInformation, "提示")
errprompt1:
Me.MousePointer = 0
Select Case Err.Number
Case 57
s =
MsgBox("磁盘已满!", vbCritical, "提示")
Case 70
s =
MsgBox("磁盘写保护!请回到原文件进行复制system.dll", vbCritical, "提示")
End SelectEnd IfEnd Sub
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。