I'm trying to use the Dir function in VBA. Something like
file = Dir("\\pca410\c$\Automation\CoaqLog\")
The problem is the folder that I'm trying to access is protected with username and password. I can manually access the folder by input username and password in the prompt window. Is there a way that I can include those information with the Dir function? Searched everywhere with no luck. Thank you.
Online search with no luck