FileExists Function

Bestemmer om en fil eller en katalog er tilgjengelig på datamediet.

Syntaks


FileExists (Filnavn som streng | Katalognavn som streng)

Returverdi

Boolsk

Parameter

FileName | DirectoryName: Any string expression that contains an unambiguous file specification. You can also use URL notation.

Feilkoder

5 Ugyldig prosedyreoppkall

Eksempel:


Sub ExampleFileExists
    MsgBox FileExists("C:\autoexec.bat")
    MsgBox FileExists("file:///d|/bookmark.htm")
    MsgBox FileExists("file:///d|/Private")
End Sub