VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Map or Disconnect Network Drive -- One line of code!!!

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!!!

Rate 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

Download this snippet    Add to My Saved Code

Map or Disconnect Network Drive -- One line of code!!! Comments

No comments have been posted about Map or Disconnect Network Drive -- One line of code!!!. Why not be the first to post a comment about Map or Disconnect Network Drive -- One line of code!!!.

Post your comment

Subject:
Message:
0/1000 characters