Private Sub CommandButton1_Click() 'Bouton Enregistrer
Dim col As Integer, derlig As Integer, x As Integer
Dim ctrl As Control, cel As Range, i As Long
With Sheets("Base")
derlig = .Range("a65536").End(xlUp).Row + 1
For Each ctrl In Me.Controls
col = Val(ctrl.Tag)
If col > 0 Then
If Not IsNumeric(ctrl) Then
.Cells(derlig, col) = ctrl
Else
.Cells(derlig, col) = CDbl(ctrl) 'format numérique simple ex: 3124
End If
End If
Next ctrl
.Range("G2:H65000").NumberFormat = "000 000 00 00" 'Numéro téléphone et fax
.Range("A:J").Columns.AutoFit
.Range("A2:J65000").Sort [A2], xlAscending
End With
Private Sub CommandButton3_Click() 'Bouton Modifier
Dim cel As Range, i As Long
If ComboBox1 <> "" Then
With Sheets("Base").Range("a2:j65000")
Set cel = .Find(ComboBox1, , xlValues, xlWhole)
If Not cel Is Nothing Then
For i = 1 To 10
cel.Offset(0, i - 1) = Me.Controls("TextBox" & i).Text
Next i
End If
End With
End If
For i = 1 To 10
Me.Controls("TextBox" & i).Text = ""
Next i
TextBox10.SetFocus
End Sub