1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub CommandButton1_Click()
Dim Nom2 As String
With Worksheets(1).Range("A55:A100")
Set c = .Find(Nom, LookIn:=xlValues)
If Not c Is Nothing Then
Range(c.Address).Select
Do While ActiveCell.Value <> ""
ActiveCell.Next.Select
Loop
ComboBox1.Activate
ComboBox1.Enabled = False
Nom2 = InputBox("Entrée le Nom du nouveau Client", "NOUVEAUX CLIENTS")
ActiveCell.Value = Nom2
Range("A55:A100").Select
Selection.Sort Key1:=Range("A55"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A4").Select
ComboBox1.Enabled = True
End If
End With
End Sub |