View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim[_47_] Jim[_47_] is offline
external usenet poster
 
Posts: 6
Default Error trapping after Dir statement

I have a line of code thus...

strDirName = Dir(strRootDir, vbDirectory + vbNormal)

If it is a directory to which I do not have access, err.number 52 is
returned along with a debug dialogue box.

I now change it to...

On error resume next
strDirName = Dir(strRootDir, vbDirectory + vbNormal)

I still get the dialogue debug box even with the 'On error resume next
statement'.

Any ideas as to why ?

Regards, Jim.