Darksaint
6/17/2011 2:38:00 PM
Marv wrote:
> On 6/16/2011 3:54 AM, Deanna Earley wrote:
>
>> On 15/06/2011 22:53, Marv wrote:
>>
>>> Why would the following statements prevent from getting a Error53 - File
....
>>> On Error Resume Next
>>> Kill "C:\Financial\*.csv"
>>> On Error Goto 0
>>
>> Because you tell it to ignore all errors.
>> If the pattern doesn't match anything, Kill() errors as normal, even
>> with wildcards.
>>
> I did not phrase the situation properly. I GET the File Not Found
> Error message and do not see why I do. I would think that the Resume
> Next should prevent from getting the error.
Read the documentation on error handling thoroughly...
> An "enabled" error handler is one that is turned on by an On Error
> statement; an "active" error handler is an enabled handler that is in
> the process of handling an error. If an error occurs while an error
> handler is active (between the occurrence of the error and a Resume,
> Exit Sub, Exit Function, or Exit Property statement), the current
> procedure's error handler can't handle the error. Control returns to the
> calling procedure. If the calling procedure has an enabled error
> handler, it is activated to handle the error.
>
There's insufficient context posted to tell for certain but one would
surmise there's an enabled error handler at caller level that is being invoked.
--