I need to map a network drive that I'm given access to with a username/password to get into the subfolders and copy files over to my local PC. I've been working on code using several options, but to no avail. The one method I did get to work was using cmd.exe and "net use...." which maps the drive, but doesn't seem to pass the credentials on to the subfolders which I can't get in to.
The long way to map it, if it helps, is to right click "this pc", select map network drive, put in the "\\IPAddress\foldername", check the box to "Connect using different credentials" Click finish. On the next popup I need to click "More Choices" and select "Use a different account" (otherwise it tries to use my current network credentials). Then I put in the domain/username and my temporary password.
I'm trying to develop a vba macro that can do this all for me just by putting in the username and password on a form. Any assistance would be appreciated.
The long way to map it, if it helps, is to right click "this pc", select map network drive, put in the "\\IPAddress\foldername", check the box to "Connect using different credentials" Click finish. On the next popup I need to click "More Choices" and select "Use a different account" (otherwise it tries to use my current network credentials). Then I put in the domain/username and my temporary password.
I'm trying to develop a vba macro that can do this all for me just by putting in the username and password on a form. Any assistance would be appreciated.