' Formulaire Consultation Clients
Private Sub UserForm_Initialize() ' Initialisation
Set f = Sheets("Clients")
For Each c In f.Range("A2:A" & f.[A65000].End(xlUp).Row)
Me.ComboBox1.AddItem c
Me.ComboBox1.SetFocus
Next c
End Sub
Private Sub ComboBox1_Click()
Set f = Sheets("Clients")
ligne = Me.ComboBox1.ListIndex + 2
Me.TextBox1 = f.Cells(ligne, 2)
Me.TextBox1.Value = Format(Me.TextBox1.Value, "0.00 %")
Me.TextBox2 = f.Cells(ligne, 3)
Dim txt As String
txt = Replace(Replace(Replace(TextBox2, ".", ","), " ¤", ""), " ", "")
TextBox2 = Format(CDbl(txt), "### ### ##0.00 ¤")
End Sub
Private Sub TextBox1_Change()
TextBox1 = Replace(TextBox1.Value, ".", ",")
End Sub
Private Sub TextBox2_Change()
TextBox2 = Replace(TextBox2.Value, ".", ",")
End Sub
Private Sub Fermer_Click()
Unload Me
End Sub
Private Sub CommandButton1_Click()
Set f = Sheets("Clients")
Application.ScreenUpdating = False
On Error Resume Next
Sheets("Clients").[A1:A100].Find(ComboBox1.Value).EntireRow.Delete
Application.ScreenUpdating = True
End Sub