DoCmd.TransferSpreadsheet

H

HelenJ

Is there a (preferably) simple way to get access to prompt if the file
already exists, rather than it just simply over writing the existing file??

Thanks
 
K

Kevin

Try the File Search command:

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "Run"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With
 
K

Klatuu

If Dir("F:\SomeDirectory\SomeFile.xls") <> "" Then
MsgBox "File Already Exists"
End If
 
H

HelenJ

Thanks Kevin but Klatuu's was simpler :)

Kevin said:
Try the File Search command:

With Application.FileSearch
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.FileName = "Run"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
End With
 
Top