?? databackup.bas
字號:
Attribute VB_Name = "backup"
'李樹永 QQ 82341763
'Email:lisypro@126.com
Option Explicit
Public Function DataBackup(dlgCommonDialog As CommonDialog) As Boolean
DataBackup = False
'Dim dlgCommonDialog As CommonDialog
' Set dlgCommonDialog = CommonDialog
Dim sFile As String
Dim DataFile As String
DataFile = App.Path & "\data.mdb"
sFile = "Data" & Format(Date, "yyyymmdd") & ".mdb"
With dlgCommonDialog
.DialogTitle = "打開"
.CancelError = False
'ToDo: 設置 common dialog 控件的標志和屬性
.Filter = "所有文件 (*.mdb)|*.mdb"
.FileName = sFile
.ShowSave
sFile = .FileName
End With
If Len(dlgCommonDialog.FileName) = 0 Then
Exit Function
End If
'ToDo: 添加處理打開的文件的代碼
If sFile = "" Then
Exit Function
End If
pubConn.Close
FileCopy DataFile, sFile
initApp
DataBackup = True
End Function
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -