Private Sub CommandButton3_Click()
Dim CTRL As Control 'Variable pour la collection des controls
Dim L As Integer
Dim Response As Byte
'Ici un message demandant d'accepter les changement en les listant
Response = MsgBox("Acceptez vous les changements ? ", vbQuestion + vbOKCancel, T & " Modification de : " & Nom)
'Si Réponse OK on continue
If Response = 1 Then
With WS
Sheets("Client").Range("a" & L).Value = ComboBox1 ' On écrit dans chaque colonne les valeurs des différents controls
Sheets("Client").Range("b" & L).Value = TextBox1
Sheets("Client").Range("f" & L).Value = ComboCP
Sheets("Client").Range("g" & L).Value = ComboBox2
Sheets("Client").Range("m" & L).Value = ComboBox3
Sheets("Client").Range("n" & L).Value = ComboBox5
Sheets("Client").Range("o" & L).Value = ComboBox4
Sheets("Client").Range("p" & L).Value = ComboBox6
Sheets("Client").Range("c" & L).Value = TextBox2
Sheets("Client").Range("d" & L).Value = TextBox3
Sheets("Client").Range("e" & L).Value = TextBox4
Sheets("Client").Range("h" & L).Value = TextBox6
Sheets("Client").Range("i" & L).Value = TextBox7
Sheets("Client").Range("k" & L).Value = TextBox8
Sheets("Client").Range("l" & L).Value = ComboBox7
MsgBox "Opération accomplie", vbInformation, T
End With
End If
End Sub