Private Sub Worksheet_Activate()
'Application.ScreenUpdating = False
With ListBox1
.ColumnHeads = True
.ColumnCount = 5 ' defini nb colonne tableau
.ColumnWidths = "60;50;85;60;40" ' largeur des colonnes
'.MultiSelect = fmMultiSelectMulti ' si multiselect
.Clear
R = 0
For L = 2 To 34
If Sheets("BASE").Cells(L, 1).Rows.Hidden = False Then
.AddItem
.List(R, 0) = Sheets("BASE").Cells(L, 1)
.List(R, 1) = Sheets("BASE").Cells(L, 2)
.List(R, 2) = Sheets("BASE").Cells(L, 3)
.List(R, 3) = Sheets("BASE").Cells(L, 4)
.List(R, 4) = Sheets("BASE").Cells(L, 5)
R = R + 1
End If
Next L
End With
With Sheets("SELECTION")
.ComboBox1.Clear
.ComboBox2.Clear
.ComboBox3.Clear
Set MonDico = CreateObject("Scripting.Dictionary")
For Each c In Sheets("BASE").Range("C2:C34")
MonDico.Item(c.Value) = c.Value
Next c
temp = MonDico.items
'--
Call tri(temp, LBound(temp), UBound(temp))
.ComboBox1.List = temp
MonDico.RemoveAll
For Each c In Sheets("BASE").Range("D2:D34")
MonDico.Item(c.Value) = c.Value
Next c
temp = MonDico.items
'--
Call tri(temp, LBound(temp), UBound(temp))
.ComboBox2.List = temp
MonDico.RemoveAll
For Each c In Sheets("BASE").Range("E2:E34")
MonDico.Item(c.Value) = c.Value
Next c
temp = MonDico.items
'--
Call tri(temp, LBound(temp), UBound(temp))
.ComboBox3.List = temp
.ComboBox1.AddItem "*"
.ComboBox2.AddItem "*"
.ComboBox3.AddItem "*"
.ComboBox1 = "*"
.ComboBox2 = "*"
.ComboBox3 = "*"
End With
'Application.ScreenUpdating = True
End Sub