Bonjour tout le monde,
Je n'arrive pas a trouver une solution dans le forum, ni dans les cours vba, ou alors je ne comprends tout simplement pas...
Je souhaiterai condenser une partie de code, dont je vous donne exemple, il me semble que ce qui tourne autour de ARRAY serait ma solution, mais j'avoue ne rien y comprendre.
With Me.ComboBox1
For j = 2 To Sheets("AMMORTISSEMENT").Range("B" & Rows.Count).End(xlUp).Row
.AddItem Sheets("AMMORTISSEMENT").Range("B" & j)
Next j
End With
With Me.ComboBox2
For j = 2 To Sheets("RENOUVELLEMENT").Range("B" & Rows.Count).End(xlUp).Row
.AddItem Sheets("RENOUVELLEMENT").Range("B" & j)
Next j
End With
With Me.ComboBox3
For j = 2 To Sheets("STOCKSQ").Range("B" & Rows.Count).End(xlUp).Row
.AddItem Sheets("STOCKSQ").Range("B" & j)
Next j
End With
With Me.ComboBox4
For j = 2 To Sheets("STOCKSNQ").Range("B" & Rows.Count).End(xlUp).Row
.AddItem Sheets("STOCKSNQ").Range("B" & j)
Next j
End With
........
.....
...
..
Merci d'avance a tous