Private Declare Function WNetAddConnection Lib "mpr.dll" Alias "WNetAddConnectionA" (ByVal lpszNetPath As String, ByVal lpszPassword As String, ByVal lpszLocalName As String) As Long Private Sub Command1_Click() Dim rtn As Long rtn = WNetAddConnection("\\Class05\xxl", "111", "") '111为password FileCopy "\\Class05\xxl\题目.txt", "C:\题目.txt" End Sub
Private Sub Command1_Click()
Dim rtn As Long
rtn = WNetAddConnection("\\Class05\xxl", "111", "") '111为password
FileCopy "\\Class05\xxl\题目.txt", "C:\题目.txt"
End Sub