BigInch
Petroleum
- Jun 21, 2006
- 15,161
It seems that a User defined type in VBA does not have a collections property. Is this correct? And if so, what is a good workaround for accessing the .count of a UDT array.

Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Type mytype
x As Double
y As Double
End Type
Sub testtype()
Dim myvar() As mytype
ReDim myvar(3 To 9)
Debug.Print "Size of myvar is " & UBound(myvar) - LBound(myvar) + 1
End Sub
For multidimensional array lbound and ubound can take a 2nd argument to identify which index is being tested.output said:Size of myvar is 7