Private Sub UserForm_Initialize()
Dim K As String, P As String, i As Long, J As Long
Set Dico = CreateObject("Scripting.dictionary")
With Sheets("BDD")
For i = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
K = "Racine"
For J = 1 To 8
K = K & ";" & .Cells(i, J).Value
Dico(K) = i
Next J
Next i
End With
T = Dico.Keys
Call tri_JB(T, LBound(T), UBound(T))
With MonArbre
.Nodes.Clear
.Nodes.Add(, , "Racine", Cells(1, 1)).Expanded = True
For i = LBound(T) To UBound(T)
Tmp = Split(T(i), ";")
.Nodes.Add(Left(T(i), Len(T(i)) - Len(Tmp(UBound(Tmp))) - 1), tvwChild, T(i), Tmp(UBound(Tmp))).Expanded = True
Next i
End With
End Sub