V
Vsn
Hi all,
Can someone give me a solution on how I will be able to check if a folder
exist (empty as well).
I have always used below method to check if files exist.
=====================================START
Function CheckFileExist(fName as String, fPath as String)
On Error GoTo Err_CheckFileExist
If Len(Dir$(fPath & "\" & fName)) < 1 Then
CheckFileExist=False
Else
CheckFileExist=True
End if
Exit_CheckFileExist:
Exit Function
Err_CheckFileExist:
Select Case Err
Case 0
Case Else
MsgBox Err.Description & vbCrLf & Err.Number, vbCritical
Resume Exit_CheckFileExist
End Select
End Function
=====================================END
It works for folders as well until the folder is empty. Can somone give me a
clue?
Thx, a lot.
Ludovic
Can someone give me a solution on how I will be able to check if a folder
exist (empty as well).
I have always used below method to check if files exist.
=====================================START
Function CheckFileExist(fName as String, fPath as String)
On Error GoTo Err_CheckFileExist
If Len(Dir$(fPath & "\" & fName)) < 1 Then
CheckFileExist=False
Else
CheckFileExist=True
End if
Exit_CheckFileExist:
Exit Function
Err_CheckFileExist:
Select Case Err
Case 0
Case Else
MsgBox Err.Description & vbCrLf & Err.Number, vbCritical
Resume Exit_CheckFileExist
End Select
End Function
=====================================END
It works for folders as well until the folder is empty. Can somone give me a
clue?
Thx, a lot.
Ludovic