|
|||||||||||||||
These pages are no longer updated and are only available for archive purposes.Click here to visit the pages with updated information. Determine if a workbook existsThe function below can be used to determine if a workbook or another file exists: Function FileExists(FullFileName As String) As Boolean
' returns TRUE if the file exists
FileExists = Len(Dir(FullFileName)) > 0
End Function
Example: If Not FileExists("C:\FolderName\SubFolder\FileName.xls") Then
MsgBox "The file doesn't exist!"
Else
Workbooks.Open "C:\FolderName\SubFolder\FileName.xls"
End If
Document last updated 1999-12-20 12:51:17 Printerfriendly version
|
|||||||||||||||
|
|||||||||||||||