|
|
Title | See if a file exists |
Description | This example shows how to see if a file exists in Visual Basic 6. |
Keywords | file, exists |
Categories | Files and Directories |
|
|
Thanks to Howard Wertenteil.
The program uses the Dir function, trims it, and sees if the result has non-zero length.
|
|
Function HZW_FileExists(ByVal WhatFile As String) As Boolean
HZW_FileExists = (0 < Len(Trim$(Dir$(WhatFile))))
End Function
|
|
|
|
|
|