VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Map a network drive

by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Fri 18th December 1998
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Map a network drive

Rate Map a network drive



Dim strPassword As String
Dim strNetworkPathName As String

    strLocalDriveLetter = "K:"                  'Local drive letter to be mapped
    strPassword = ""                            'specify network password if required
    strNetworkPathName = "\\NETWORKPATH\VOL1"   'path to network drive
    
    If WNetAddConnection(strNetworkPathName, strPassword, strLocalDriveLetter) > 0 Then
        MsgBox ("An Error occurred mapping the drive")
    Else
        MsgBox ("Drive successfully mapped!")
    End If


Download this snippet    Add to My Saved Code

Map a network drive Comments

No comments have been posted about Map a network drive. Why not be the first to post a comment about Map a network drive.

Post your comment

Subject:
Message:
0/1000 characters