(Q) Is there a simple way to check if a particular file or folder
exist?
(A) Yes, the Dir function can be easily used for this.
(Thanks Andy Baron for the correction)
Function fIsFileDIR(stPath As String, _
Optional lngType As Long) _
As Integer
On Error Resume Next
fIsFileDIR = Len(Dir(stPath, lngType)) > 0
End Function
|