Greetings,
I have a File Explorer form with the typical TreeView and ListView setup. It works great on my test machine, but on my client's network I keep running into problems when the program hits a file or folder that it doesn't have access permissions for. As the program cycles through folders to add them to the TreeView, if one of the folders is not accessible, an "Access Denied" error is thrown. I've tried surrounding the code with "Try/Catch" statements and that works fine on my test system, but on the client's network the error still stops the sub.
Can anyone tell me how to have my code check the folder permissions before trying to access the folder, so that my code will skip over any folders to which it doesn't have access?
Please note: Changing the folder permissions to allow access to my program is NOT an option.
Thanks!
I have a File Explorer form with the typical TreeView and ListView setup. It works great on my test machine, but on my client's network I keep running into problems when the program hits a file or folder that it doesn't have access permissions for. As the program cycles through folders to add them to the TreeView, if one of the folders is not accessible, an "Access Denied" error is thrown. I've tried surrounding the code with "Try/Catch" statements and that works fine on my test system, but on the client's network the error still stops the sub.
Can anyone tell me how to have my code check the folder permissions before trying to access the folder, so that my code will skip over any folders to which it doesn't have access?
Please note: Changing the folder permissions to allow access to my program is NOT an option.
Thanks!