.FileExists

J

jeff

Take a look at this (also see excel help):

Private Sub CommandButton1_Click()
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileexists("c:\Myfile.txt") Then
MsgBox "File exists"
Else
MsgBox "file not found"
End If
End Sub

jeff

-----Original Message-----
Could I get an example of how to use 'object.FileExists'
to see if a file already exists?
 
Top