I have a macro that has a procedure to run a code and the function code is :
Option Compare Database
Public Function BackUpDB()
Dim oFiles As FileSystemObject
Dim strSource As String, strDest As String
strSource = "T:\Tech2001\Tech2001.mdb"
strDest = "C:\My Documents\backup\"
Set oFiles = New FileSystemObject
oFiles.CopyFile strSource, strDest, True
Set oFiles = Nothing
MsgBox "Back up succesful ", vbExclamation, "BACK UP COMPLETED"
End Function
I get an error when I run the that says can't find the function name
What I'm doing wrong????
Option Compare Database
Public Function BackUpDB()
Dim oFiles As FileSystemObject
Dim strSource As String, strDest As String
strSource = "T:\Tech2001\Tech2001.mdb"
strDest = "C:\My Documents\backup\"
Set oFiles = New FileSystemObject
oFiles.CopyFile strSource, strDest, True
Set oFiles = Nothing
MsgBox "Back up succesful ", vbExclamation, "BACK UP COMPLETED"
End Function
I get an error when I run the that says can't find the function name
What I'm doing wrong????