Is this what you want to do?
Column A is main categories with the category names starting at Row 3.
Column B is the parent category for the sub category that is listed in Column C.
Here is the code:
Option Explicit
Private Sub UserForm_Initialize()
Dim i As Long
Dim j As Long
Dim k As Long
Dim Title As String
Dim xNode As Node
Dim NodeKey As String
Dim NodeKey2 As String
j = Sheets("Sheet1").Range("A65536").End(xlUp).Row
With Me.TreeView1
For i = 3 To j
Set xNode = .Nodes.Add
NodeKey = Range("A" & i).Text
With xNode
.Key = NodeKey
.Text = NodeKey
.Expanded = False
End With
Next i
j = Sheets("Sheet1").Range("C65536").End(xlUp).Row
For i = 3 To j
Set xNode = .Nodes.Add(Range("B" & i).Text, tvwChild)
NodeKey = Range("C" & i).Text
With xNode
.Key = NodeKey
.Text = NodeKey
End With
Next i
End With
Set xNode = Nothing
End Sub
See the attachment for more information.