does a file exist?

J

Junior

I want to check if a file exists and then take an action.
what is the correct way to determine if a certain file exists?
say if i wanted to know if this file was present?
V:\Data\Letterone.txt
thanks
 
R

Ron Weiner

Take a look at the Dir() command. Dir("V:\Data\Letterone.txt") will return
Letterone.txt if the file exists and an empty string if the file does NOT
exist.

Ron W
 
Top