Bonjour,
En supposant que ces variables soient déclarées dans un module standard :
Public CBS() As Variant
Public IndiceCbs As Integer
Le code pourrait être celui-là :
Dim I As Integer
Continuer = True
With ListBox1
If .ListCount > 0 Then
IndiceCbs = 0
For I = 0 To .ListCount - 1
ReDim Preserve CBS(IndiceCbs)
CBS(IndiceCbs) = .List(I, 1)
IndiceCbs = IndiceCbs + 1
Next I
End If
End With
Pour restituer :
For IndiceCbs = LBound(CBS) To UBound(CBS)
Debug.Print CBS(IndiceCbs)
Next IndiceCbs