copying file from one location to another using vb code
Posted on 2001-06-12
'I basically want to copy a file to another location using vb code..... yes very simple but I cant get
it to work.
'Here is so code I am currently using.. Im storing the file name and location in a string and was expecting
to copy this to another location.
Public function CopyFile()
Dim strOldFile As String
Dim strFileDest As String
.FileName = ""
strFileDest = frmAssessment.dlgImage.FileName
FileSystemObject.CopyFile strFileDest, "c:\database\"
Call RenameFile(strOldFileName, strNewFileName)
'If you have anyother ideas how I can copy a file to a new location plz reply. The File system object bring up a error message (object required) error 424'