1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub CommandButton8_Click()
Dim Lig As Long
' modifications
If Me.ListBox1.ListIndex > -1 Then
Lig = 3 + Me.ListBox1.ListIndex
Else
Lig = 3 + Me.ComboBox1.ListIndex
End If
With Sheets("Adm.")
.Range("B" & Lig).Value = Me.ComboBox2
.Range("D" & Lig).Value = Me.TextBox4 ' Ne pas inverser l'ordre des TextBox 4, 5, 3
.Range("E" & Lig).Value = Me.TextBox5 'Ne pas inverser l'ordre des TextBox 4, 5, 3
.Range("C" & Lig).Value = Me.TextBox3 'Ne pas inverser l'ordre des TextBox 4, 5, 3
.Range("J" & Lig).Value = Me.TextBox9
.Range("K" & Lig).Value = Me.TextBox10
.Range("F" & Lig).Value = Me.TextBox6
.Range("P" & Lig).Value = "Modifié le: " & " " & Format(Now, "dd/mm/yyyy") & " " & " à " & Format(Now, "hh:mm:ss")
' Etc ...
End With
Me.ListBox1.ListIndex = -1
End Sub |