I have a VBA module for which the ultimate goal is to write an Excel file into a specific folder. That folder resides on a networked shared drive and has controlled access via the user's LAN ID.
So that the file is not lost in the event that a user is not authorized to read or write to the folder, I wanted to attempt the write of a test file. Failure would mean that the user is not authorized. Success would result in a subsequent Kill of the file.
No matter what I try and no matter what error trap I establish, the code will halt with an Error 1004 screen. I've tried On Error Goto, On Error Resume Next, Application.EnableEvents = False. All still end up with the Error 1004 when I attempt the test file write.
I've also (unsuccessfully) tried to work with testing the folder with the vbDirectory function since it has files already and the directory is visible even if the user has no permissions.
Searches on various sites have not turned up anything with keywords such as "protected", "permissions", "error 1004", and more. I may just be overlooking *the* keyword that will find something, but it remains elusive.
Any help would be greatly appreciated.
So that the file is not lost in the event that a user is not authorized to read or write to the folder, I wanted to attempt the write of a test file. Failure would mean that the user is not authorized. Success would result in a subsequent Kill of the file.
No matter what I try and no matter what error trap I establish, the code will halt with an Error 1004 screen. I've tried On Error Goto, On Error Resume Next, Application.EnableEvents = False. All still end up with the Error 1004 when I attempt the test file write.
I've also (unsuccessfully) tried to work with testing the folder with the vbDirectory function since it has files already and the directory is visible even if the user has no permissions.
Searches on various sites have not turned up anything with keywords such as "protected", "permissions", "error 1004", and more. I may just be overlooking *the* keyword that will find something, but it remains elusive.
Any help would be greatly appreciated.