Sub macro1() Set ofso = CreateObject("Scripting.FileSystemObject") MsgBox (ofso.fileexists("c:\hi.txt")) End Sub