ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error trapping after Dir statement (https://www.excelbanter.com/excel-programming/310163-error-trapping-after-dir-statement.html)

Jim[_47_]

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.





All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com