Hi all,
I'm trying to create a macro, that would map a network drive to a letter, login, and post some files there. I have been able to accomplish all but the login part, which is a bit of a pain... Below is what I've got so far:
Sub MapDrive()
' =================== MAP DRIVE Z ===================
Dim MyDrive As Object
Dim MyDriveName As String
MyDriveName = \\blahblah\folder\
'------------------------------------------------------------
'- map drive
On Error Resume Next ' DRIVE MAY BE MAPPED ALREADY
Set MyDrive = CreateObject("WScript.Network")
MyDrive.MapNetworkDrive "Z:", MyDriveName
DoEvents
Shell "explorer.exe " & "Z:\", vbNormalFocus
End Sub
Basically, I need some code after the "Shell explorer..." to fill in login info into a message box that pops up and 'click' ok, close the folder, after which another macro continues to post files into the drive.
I've been searching for a solution for a while, but I can only locate some gmail examples... Any ideas?
I'm trying to create a macro, that would map a network drive to a letter, login, and post some files there. I have been able to accomplish all but the login part, which is a bit of a pain... Below is what I've got so far:
Sub MapDrive()
' =================== MAP DRIVE Z ===================
Dim MyDrive As Object
Dim MyDriveName As String
MyDriveName = \\blahblah\folder\
'------------------------------------------------------------
'- map drive
On Error Resume Next ' DRIVE MAY BE MAPPED ALREADY
Set MyDrive = CreateObject("WScript.Network")
MyDrive.MapNetworkDrive "Z:", MyDriveName
DoEvents
Shell "explorer.exe " & "Z:\", vbNormalFocus
End Sub
Basically, I need some code after the "Shell explorer..." to fill in login info into a message box that pops up and 'click' ok, close the folder, after which another macro continues to post files into the drive.
I've been searching for a solution for a while, but I can only locate some gmail examples... Any ideas?