Bonjour Nada, bonjour le forum,
Je suis pas sûr d'avoir bien compris... Essaie comme ça :
Private Sub CommandButton5_Click()
Dim O As Worksheet
Dim TV As Variant
Dim I As Integer
Dim TEST As Boolean
Dim no_ligne As Integer
Set O = Worksheets("SHEET1")
TV = O.Range("A1").CurrentRegion
For I = 2 To UBound(TV, 1)
If TV(I, 1) = Me.TextBox14.Value Then
no_ligne = I
TEST = True
Exit For
End If
Next I
If TEST = True Then
MsgBox "ok"
TextBox1.Value = Cells(no_ligne, 2).Value
TextBox2.Value = Cells(no_ligne, 3).Value
ComboBox2.Value = Cells(no_ligne, 4).Value
ComboBox3.Value = Cells(no_ligne, 5).Value
TextBox5.Value = Cells(no_ligne, 6).Value
ComboBox4.Value = Cells(no_ligne, 7).Value
TextBox7.Value = Cells(no_ligne, 8).Value
TextBox8.Value = Cells(no_ligne, 9).Value
TextBox9.Value = Cells(no_ligne, 10).Value
TextBox10.Value = Cells(no_ligne, 11).Value
TextBox12.Value = Cells(no_ligne, 12).Value
TextBox11.Value = Cells(no_ligne, 13).Value
TextBox13.Value = Cells(no_ligne, 14).Value
Me.TextBox1.Enabled = False
Me.TextBox2.Enabled = False
Me.ComboBox2.Enabled = False
Me.ComboBox3.Enabled = False
Me.TextBox5.Enabled = False
Me.ComboBox4.Enabled = False
Me.TextBox7.Enabled = False
Me.TextBox8.Enabled = False
Me.TextBox9.Enabled = False
Me.TextBox10.Enabled = False
Me.TextBox12.Enabled = False
Me.TextBox11.Enabled = False
Me.TextBox13.Enabled = False
Else
MsgBox "login incorrect"
End If
End Sub