I have this function that finds out if a directory exist.
Function dirExists(path As String) As Boolean
On Error Resume Next
dirExists = Dir$(path) <> ""
'MsgBox (Dir$(path))
'MsgBox (path & dirExists)
End Function
and I have this sub to pass the pathname to this function:
boolDir = direxists(txtFileName.text), where txtFileName.text is assigned as "c:\cases\year"
although I know for sure that this is a valid path (I had to create it to test), the dirExists function returns false.
Is this function not reading the path that I'm passing it with?
Any help will be greatly appreciated.
Function dirExists(path As String) As Boolean
On Error Resume Next
dirExists = Dir$(path) <> ""
'MsgBox (Dir$(path))
'MsgBox (path & dirExists)
End Function
and I have this sub to pass the pathname to this function:
boolDir = direxists(txtFileName.text), where txtFileName.text is assigned as "c:\cases\year"
although I know for sure that this is a valid path (I had to create it to test), the dirExists function returns false.
Is this function not reading the path that I'm passing it with?
Any help will be greatly appreciated.