Oops, messed up on the Match test.

Change this line

[vba]

If aryIndex > 0 Then
[/vba]

to

[vba]

If aryIndex > 1 Then
[/vba]

It doesn't work after level 5 as you don't have any dependent data for those further levels.