en basit hali ile aşağıdaki kodları butona ekleyebilirsiniz ama önce
- Alt+F11 basım Araçlar- Tools > referanslar-References açıp
- "Microsoft Scripting Runtime" eklemelisiniz
Private Sub Komut11_Click()
strFrom = Application.CurrentProject.Path & "\" & Application.CurrentProject.Name
strTo = Application.CurrentProject.Path & "\yedek\" & Application.CurrentProject.Name
Dim fso As FileSystemObject
Dim sSourcePath As String
Dim sSourceFile As String
Dim sBackupPath As String
Dim sBackupFile As String
Dim DB As New Access.Application
If Len(Dir(Application.CurrentProject.Path & "\yedek", vbDirectory)) = 0 Then
MkDir Application.CurrentProject.Path & "\yedek"
End If
Set fso = New FileSystemObject
fso.copyFile strFrom, strTo, True
Set fso = Nothing
Beep
MsgBox "Backup was successful and Saved" & "Backup completed"
End Sub
dilerim işinize yarar
yedekleme_uygulaması_hy 2.rar
(Dosya Boyutu: 23,45 KB | İndirme Sayısı: 14)