Hallo guys, it is me again. I need help how to create a simple backup file by just copying a file to another folder.
Look at my code.
Private Sub mnuBackup_Click()
Dim SourceFile, DestinationFile As String
On Error GoTo FileCopyFailed
SourceFile = "D:\MyWorks\data\facility.mdb"
DestinationFile = "D:\MyWorks\backup\facility.mdb"
FileCopy SourceFile, DestinationFile
MsgBox "BACKUP FILE WAS SUCCESSFUL!", vbInformation
Exit Sub
FileCopyFailed:
MsgBox Err.Number & " " & Err.Description & " " & Err.Source
Err.Clear
Resume Next
End Sub
what am i going to do with this code. The error is the one is red color.