by Bryan Blake (8 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 18th April 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Map or Disconnect Network Drive -- One line of code!!!
Shell "net use " & DriveLetter & ": " & ServerShare
End Function
Function Disconnect(DriveLetter As String)
Shell "net use " & DriveLetter & ": /del"
End Function
Private Sub Command1_Click()
Map "t", "\\server\share"
End Sub
Private Sub Command2_Click()
Disconnect "t"
End Sub