Private Sub CommandButton4_Click()
Feuil2.Activate
With ActiveWindow
.ScrollRow = Val(TreeView1.SelectedItem.Key)
.ScrollColumn = 1
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
Dim NumCol As Integer, j As Integer
Dim NumLig As Integer, k As Integer
Dim Cell As Range
For Each Cell In Feuil2.Range("A1:A" & Feuil2.Range("N65533").End(xlUp).Row)
NumCol = Cell.End(xlToRight).Column
NumLig = Cell.Row
If NumCol = 2 Then
TreeView1.Nodes.Add , , NumLig & "_" & NumCol, _
UCase(Feuil2.Cells(NumLig, NumCol))
Else
k = Feuil2.Cells(NumLig, NumCol).Offset(0, -1).End(xlUp).Row
j = Feuil2.Cells(NumLig, NumCol).Offset(0, -1).Column
If Feuil2.Cells(NumLig, 14) = "x" Then
TreeView1.Nodes.Add _
k & "_" & j, tvwChild, NumLig & "_" & NumCol, _
Feuil2.Cells(NumLig, NumCol)
Else
TreeView1.Nodes.Add _
k & "_" & j, tvwChild, NumLig & "_" & NumCol, _
UCase(Feuil2.Cells(NumLig, NumCol))
End If
End If
Next Cell
TreeView1.Style = 5
End Sub