Re : Copie d'un classeur vers un autre
re
Pour information
SOURCE:Ce site n'existe plus
Private Declare Function WNetAddConnectionA Lib "mpr.dll" _
(ByVal lpszNetPath As String, ByVal lpszPassword As String, _
ByVal lpszLocalName As String) As Long
Private Declare Function WNetCancelConnectionA Lib "mpr.dll" _
(ByVal lpszName As String, ByVal bForce As Long) As Long
Sub Test()
If WNetAddConnectionA("\\Toto\Disque dur", vbNullString, "Z:") = 0 _
Then MsgBox """\\Toto\Disque dur"" connecté au lecteur Z:"
' blablablablabla...
If WNetCancelConnectionA("Z:", True) Then _
MsgBox "Lecteur Z: déconnecté."
End Sub
Bonne chance,
Laurent