检查指定文件是否存在
***************** Code Start *******************
Function fIsFileDIR(stPath As String, _
Optional lngType As Long) _
As Integer
'Fully qualify stPath
'To check for a file
' ?fIsFileDIR("c:\winnt\win.ini")
'To check for a Dir
' ?fIsFileDir("c:\msoffice",vbdirectory)
'
On Error Resume Next
fIsFileDIR = Len(Dir(stPath, lngType)) > 0
End Function
'***************** Code End *********************
Access软件网交流QQ群(群号:198465573) |