Is it possible to map to a users My Documents then to a spreadsheet and open it?
I have a script which uses an input box to collect the user name and add it to the file path. i would like to have the speadsheet added to this then for it to open.
part of my code below (with many thanks from Mark and others)
Sub MapDrives
On Error Resume Next
Dim UserString, UserPassword, WSHNetwork
UserString = login.Value
UserPassword = password.Value
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "P:", "\\bilbo\users\" & UserString,True, UserString,UserPassword
I have a script which uses an input box to collect the user name and add it to the file path. i would like to have the speadsheet added to this then for it to open.
part of my code below (with many thanks from Mark and others)
Sub MapDrives
On Error Resume Next
Dim UserString, UserPassword, WSHNetwork
UserString = login.Value
UserPassword = password.Value
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "P:", "\\bilbo\users\" & UserString,True, UserString,UserPassword