Automating Web Application -> Navigating the DOM

Hello,

I'm trying to navigate the DOM to find the uncle of an element with a particular class. Essentially, I'm retrieving the grandparent, then find all the children of the grandparent, and then I want to find the children with a specific class. This is the code I have so far:

Set oTestObject = Browser("Browser").Page("Page").WebEdit("WebEdit")
Set oGrandParent = oTestObject.Object.closest("div.ant-select-selector")
Set oChildren = oGrandParent.children
iNbSiblings = oChildren.length
MsgBox iNbSiblings => I get 2 which is correct
MsgBox oChildren(0).className => I get the class name of the 1st child
MsgBox oChildren(1).className => I get the class name of the 2nd child (this is the child I'm interested in)

So, in order to make it work all the time, since I don't know the number of children ahead of time and whether the one I'm looking for is really there, I'd like to iterate through all the children in a for loop to find the one I'm interested in. However, I'm unable to do as I get an error message. So, just as a test, I tried this piece of code:

iIndex = 0
Msgbox oChildren(iIndex).className

But it doesn't work either. I get the following error:

Object required: '[string: "[Object]"]'
Line (53): "Msgbox oChildren(iIndex).className".

How come? I don't understand why I cannot use a variable instead of using 0 and 1. How can I make it work in order to iterate through all the children?