RE/
How would I do that?
One way:
------------------------------------------
Function fileExist(ByVal theFilePath As Variant) As Integer
debugStackPush mModuleName & ": fileExist"
On Error GoTo fileExist_err
' PURPOSE: To determine whether-or-not a file exists
' ACCEPTS: A full path to the file in question
' RETURNS: True or False depending...
Dim skipLine As String
fileExist = (Dir$(theFilePath) <> "")
fileExist_xit:
debugStackPop
On Error Resume Next
Exit Function
fileExist_err:
Select Case Err
Case 71
MsgBox "That path refers to a floppy disk. Please insert the disk.", 49,
"Insert Disk"
Case 76
'(We expect 76 if no file found)
Case 68
skipLine = Chr$(13) & Chr$(10) & Chr$(13) & Chr$(10)
MsgBox "The system has reported that drive " & UCase$(Left$(theFilePath,
2)) & " is unavailable." & skipLine & "One possibility is that you specified the
wrong drive; another is that there is a problem with your LAN logon.", 16,
"Cannot find Drive"
Case Else
bugAlert True, ""
End Select
Resume fileExist_xit
End Function
------------------------------------------
--
PeteCresswell