M
Mike Archer
Hello all
The following line returns a run time error 52 (bad file
name) occasionally when sName does not exist:
If Dir(sName) <> "" Then
The If block code should be skipped when sName does not
exist, not return an error. The error occurs
sporadically. Most of the time, the code performs as
expected. When the error occurs, it will not repeat in
debug mode (it steps through the line just fine).
Am I doing something wrong with the Dir statement or is
there a more stable way to check for the existence of
sName without creating a lot of overhead?
TIA
Mike
The following line returns a run time error 52 (bad file
name) occasionally when sName does not exist:
If Dir(sName) <> "" Then
The If block code should be skipped when sName does not
exist, not return an error. The error occurs
sporadically. Most of the time, the code performs as
expected. When the error occurs, it will not repeat in
debug mode (it steps through the line just fine).
Am I doing something wrong with the Dir statement or is
there a more stable way to check for the existence of
sName without creating a lot of overhead?
TIA
Mike