Vec
Re,
Vous voulez pas mal de chose, avez comment un code ou pas?
Re,
Vous voulez pas mal de chose, avez comment un code ou pas?
Avec un code voila mon code prière de jetter un coup d'oeil
Private Sub ListBox1_Click()
Me.TextBox1.Value = Me.ListBox1.List(Me.ListBox1.ListIndex, 1)
Me.TextBox1.SetFocus
Me.TextBox1.SelStart = 0
Me.TextBox1.SelLength = Len(Me.TextBox1.Text)
Me.TextBox1.SetFocus
End Sub
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
If IsNumeric(Me.TextBox1.Value) Then
Me.ListBox1.List(Me.ListBox1.ListIndex, 1) = Me.TextBox1.Value
Me.ListBox1.ListIndex = Me.ListBox1.ListIndex + 1
Me.TextBox1.SetFocus
Me.TextBox1.SelStart = 0
Me.TextBox1.SelLength = Len(Me.TextBox1.Text)
Me.TextBox1.SetFocus
Else
MsgBox "Erreur de Saisie"
Me.TextBox1.SetFocus
Me.TextBox1.SelStart = 0
Me.TextBox1.SelLength = Len(Me.TextBox1.Text)
Me.TextBox1.SetFocus
End If
End If
End Sub
Private Sub UserForm_Initialize()
Dim Sh1 As Worksheet
Set Sh1 = ThisWorkbook.Sheets("Base")
Me.ListBox1.Clear
Me.ListBox1.RowSource = ""
Me.ListBox1.List = Sh1.Range("A5:C15").Value
Me.ListBox1.ColumnCount = 3
Me.ListBox1.ColumnWidths = "50;100;100"
Me.TextBox1.Value = ""
Set Sh1 = Nothing
End Sub