Hi,

Let's say I have user-defined type:

Type Person
    Name as String
    Age as Long
    Pets() as String
End Type

Sub CountElements()

Debug.Print "Number of Elements in UDT: "; CountElementsInUDT(Person)

'This should return 3.

End Sub
The type has three elements (Name, Age, Pets). Is there some way that I can return the number of elements of a UDT like above?

Thanks a lot for reading!