Bonjour, j'ai un userform dans lequel je rentre tout ce qu'il faut savoir sur un client.
Je souhaite trouver un moyen de pouvoir modifier un client dans la liste.
J'arrive a retrouver ce client mas pas modifier la fiche.
Avec le code si dessous, il me crée une nouvelle ligne au lieu de modifier celle ci.
Private Sub CommandButton5_Click()
'modifier un client
Dim modif As Integer
If MsgBox("modification éffectué", vbYesNo, "confirmation") = vbYes Then
If Not ComboBox1.Value = "" Then
Sheets("clients").Select
modif = ComboBox1.ListIndex + 2
Cells(modif, 1) = TextBox11.Value
Cells(modif, 2) = TextBox3.Value
Cells(modif, 3) = ComboBox1.Value
Cells(modif, 4) = TextBox4.Value
Cells(modif, 5) = TextBox5.Value
Cells(modif, 6) = TextBox6.Value
Cells(modif, 7) = TextBox7.Value
Cells(modif, 8) = TextBox8.Value
Cells(modif, 9) = TextBox9.Value
Cells(modif, 10) = TextBox10.Value
Exit Sub
End If
End If
Unload UserForm5
UserForm5.Show 0
End Sub
Donc je cherche le moyen de se positionner sur la cellule du nom du client et ensuite recopier tous les champs.
Merci