jcdv
05-23-2009, 07:40 AM
This is very weird.
By some reason, a macro excel I have working before properly suddenly stop to function.
It uses various file IO low level functions, such as this:
===
Public Function FileFolderExists(strFullPath As String) As Boolean
On Error GoTo EarlyExit
If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileFolderExists = True
EarlyExit:
On Error GoTo 0
End Function
===
The problem is that it issues no error at all, but it doesn't work fine. It always return true, whether the folder exists or not. All other file IO functions have the same problem: No error, but they do nothing.
The curious thing is that it used to work well, but now they don't.
Question: Is there a configuration setting that needs to be done for this to work? Please help, I'm really confused. :think:
By some reason, a macro excel I have working before properly suddenly stop to function.
It uses various file IO low level functions, such as this:
===
Public Function FileFolderExists(strFullPath As String) As Boolean
On Error GoTo EarlyExit
If Not Dir(strFullPath, vbDirectory) = vbNullString Then FileFolderExists = True
EarlyExit:
On Error GoTo 0
End Function
===
The problem is that it issues no error at all, but it doesn't work fine. It always return true, whether the folder exists or not. All other file IO functions have the same problem: No error, but they do nothing.
The curious thing is that it used to work well, but now they don't.
Question: Is there a configuration setting that needs to be done for this to work? Please help, I'm really confused. :think: