Private Sub ComboBox1_GotFocus()
Dim t, i&
t = [A1].CurrentRegion.Resize(, 2)
ComboBox1.Clear 'RAZ
For i = 2 To UBound(t)
ComboBox1.AddItem t(i, 1) & " " & t(i, 2)
Next
ComboBox1.DropDown
End Sub
Private Sub ComboBox1_GotFocus()
Dim t, a$(), i&
t = [A1].CurrentRegion.Resize(, 2)
If UBound(t) = 1 Then ComboBox1.Clear: Exit Sub
ReDim a(1 To UBound(t) - 1)
For i = 2 To UBound(t)
a(i - 1) = t(i, 1) & " " & t(i, 2)
Next
ComboBox1.List = a
ComboBox1.DropDown
End Sub
Option Explicit
Private Sub ComboBox1_Change()
If ComboBox1.Text <> "" Then
Call Insert
Else
Exit Sub
End If
End Sub
Sub Insert()
Dim t, a$(), i&
t = [A1].CurrentRegion.Resize(, 4)
If UBound(t) = 1 Then ComboBox1.Clear: Exit Sub
ReDim a(1 To UBound(t) - 1)
For i = 2 To UBound(t)
a(i - 1) = t(i, 1) & " - " & t(i, 2) & " - " & t(i, 3) & " - " & t(i, 4)
Next
ComboBox1.List = a
ComboBox1.Select
End Sub
Effectivement 255 c'est pour une chaîne de caractères entrée manuellement.PS: La longueur maxi d'une liste données/validation créée par VBA est de 8.000 caractères depuis Excel 97 et non pas 255