'***************** Code Start *******************
Function FIsFileDIR(stPath As String, Optional lngType As Long) As Boolean
'To check for a file
' ?fIsFileDIR("c:\winnt\win.ini")
'To check for a Dir
' ?fIsFileDir("c:\msoffice",vbdirectory)
'
On Error Resume Next
If stPath <> "" Then
If Len(Dir(stPath, lngType)) > 0 Then
FIsFileDIR = True '文件存在
Else
FIsFileDIR = False '文件不存在
End If
Else
FIsFileDIR = False
End If
End Function
'************ code end **********
Access软件网交流QQ群(群号:198465573) |