Public Function FileExists(Filename as string) as Boolean
On Local Error got FileOpenError
Dim FileNum as long
FileNum = Freefile
OPEN Filename FOR INPUT AS FileNum
Close FileNum
FileExists = True
Exit Function
:FileOpenError
FileExists = False
End Function