Jan 16, 2007 #1 bnath005 MIS Aug 19, 2005 14 US Set objFSO = CreateObject("Scripting.FileSystemObject") If the file I am looking for doesn't exist, then the next line is causing an error. Set objFile = objFSO.GetFile("C:\code\OpicsEod\file.txt") thanks much appreciated. nath
Set objFSO = CreateObject("Scripting.FileSystemObject") If the file I am looking for doesn't exist, then the next line is causing an error. Set objFile = objFSO.GetFile("C:\code\OpicsEod\file.txt") thanks much appreciated. nath
Jan 16, 2007 #2 dm4ever Technical User Jul 3, 2006 991 US If objFSO.FileExists("C:\code\OpicsEod\file.txt") Then Set objFile = objFSO.GetFile("C:\code\OpicsEod\file.txt") End If -------------------------------------------------------------------------------- dm4ever My philosophy: K.I.S.S - Keep It Simple Stupid Upvote 0 Downvote
If objFSO.FileExists("C:\code\OpicsEod\file.txt") Then Set objFile = objFSO.GetFile("C:\code\OpicsEod\file.txt") End If -------------------------------------------------------------------------------- dm4ever My philosophy: K.I.S.S - Keep It Simple Stupid
Jan 16, 2007 #3 PHV MIS Nov 8, 2002 53,708 FR strPath = "C:\code\OpicsEod\file.txt" If objFSO.FileExists(strPath) Then Set objFile = objFSO.GetFile(strPath) ... Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
strPath = "C:\code\OpicsEod\file.txt" If objFSO.FileExists(strPath) Then Set objFile = objFSO.GetFile(strPath) ... Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jan 16, 2007 Thread starter #4 bnath005 MIS Aug 19, 2005 14 US thanks much. I figured out. nath Upvote 0 Downvote