' Determinar si un fichero existe o no:

Private Sub Form_Load()
    On Error GoTo Fallo
    x = GetAttr("C:\Autoexec.bat")
    MsgBox "El fichero existe."
    Exit Sub
Fallo:
    MsgBox "El fichero no existe."
End Sub