The following Excel VBA function may be used to test if a file exists. The wbName parameter refers to the full path of a specific file. The function will return true if the file is found.
1 2 3 4 5 | Option Explicit Function IsFileExist(wbName As String) As Boolean IsFileExist = Len(Dir(wbName)) End Function |