I'm using an if-then-else statement, to check if a file exists before reading it in.
if (objFileSys.FileExists("C:\hello.txt")) then
Set objTextStream = objFileSys.OpenTextFile
("C:\hello.txt",1)
else
"File doesn't exist message"
end if
Whether the file exists or not it always goes to the else statement.
If I try (objFileSys.FileExists("C:\hello.txt")= False) then the file is read in if it's there and crashes if it isn't.
Copied the code from the web and verifyed it and my syntax looks right, but for some reason it doesn't seem to be checking it properly
I'm I missing something (again) or are there other factors which can influence objFileSys???
thanks
if (objFileSys.FileExists("C:\hello.txt")) then
Set objTextStream = objFileSys.OpenTextFile
("C:\hello.txt",1)
else
"File doesn't exist message"
end if
Whether the file exists or not it always goes to the else statement.
If I try (objFileSys.FileExists("C:\hello.txt")= False) then the file is read in if it's there and crashes if it isn't.
Copied the code from the web and verifyed it and my syntax looks right, but for some reason it doesn't seem to be checking it properly
I'm I missing something (again) or are there other factors which can influence objFileSys???
thanks