'================================================================
'- MAP NETWORK DRIVE
'- if necessary map the drive by hand to see the correct name
'- it is not always the same as shown in Explorer
'- Brian Baulsom October 2007
'================================================================
'- does the job
Private Sub MapDrive()
Dim MyDriveName As String
MyDriveName = "\\Brian-dell\MY_FILES (F)"
'------------------------------------------------------------
'- map drive
On Error Resume Next ' DRIVE MAY BE MAPPED ALREADY
Set MyDrive = CreateObject("WScript.Network")
MyDrive.MapNetworkDrive "F:", MyDriveName
DoEvents
'--------------------------------------------------------------
'- error check
If Err.Number <> 0 Then
MsgBox (" Drive already mapped or not available ")
Else
MsgBox ("Mapped OK")
End If
End Sub
'-------------------------------------------------------------------