Private Sub CommandButton2_Click()
Dim wksht As Worksheet
If TextBox1.Value = "" Or TextBox2.Value = "" Then
MsgBox ("Veuillez selectionner la liaison à modifier ainsi que le nouveau fichier source")
Else
For Each wksht In ActiveWorkbook.Worksheets
wksht.Unprotect "pwd"
Next
ActiveWorkbook.ChangeLink Name:=TextBox1.Value, NewName:=TextBox2.Value, Type:=xlExcelLinks
For Each wksht In ActiveWorkbook.Worksheets
wksht.Protect "pwd", , , , UserInterfaceOnly:=True
Next
ActiveWorkbook.Protect "pwd", True
Unload Me
End If
End Sub