Somebody can help me on how to map a network drive. I already posted this question but nobody answered me directly. The O.S. that I going to map is Win 2000 with the username: Admin; password: Companyname; path:\\192.168.0.70. Please help me!

I have a code found given by other members here.
I found this but still doesn't work.


VB Code:
  1. Private Declare Function WNetAddConnection Lib "mpr.dll" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszstrPassword As String, ByVal lpszLocalName As String) As Long
  2.  
  3. Dim strLocalDriveLetter As String
  4.  
  5. Dim strPassword As String
  6.  
  7. Dim strNetworkPathName As String
  8.  
  9.     strLocalDriveLetter = "Z:"                  'Local drive letter to be mapped
  10.  
  11.     strPassword = ""                            'specify network password if required
  12.  
  13.     strNetworkPathName = "\\NEWPATH\NEWPATH"   'path to network drive
  14.    
  15.     If WNetAddConnection(strNetworkPathName, strPassword, strLocalDriveLetter) > 0 Then
  16.  
  17.         MsgBox ("An Error occurred mapping the drive")
  18.  
  19.     Else
  20.  
  21.         MsgBox ("Drive successfully mapped!")
  22.  
  23.     End If

My question in this code is where I gonna put my username?
I'm new in VB, please help me out this. tnx