Can a class member return an array?

I have class containing a private member which is an array. I want to write a function or property to return that array. This seems to be a problem. I keep getting a type mismatch error in the getItems function. I’ve tried to type the function or property as an array but that seems to be illegal.Any help would be appreciated.

’ Sorry about the way the forum handles indenting

Private Class MessageSection

Private arrItems() As SectionItem

Public Sub addItem(itemToAdd As SectionItem)

Dim i As Integer

	

i = Ubound(Me.arrItems) + 1

Redim Preserve Me.arrItems(0 To i)

Me.arrItems(i) = itemToAdd

End Sub

Public Function getItems() As Variant

Let Me.getItems = Cvar(Fulltrim(Me.arrItems))

End Function

End Class

“Frikin’ LotusScript and arrays”

Subject: only if you’re not using custom datatypes

So, arrItem was an array of custom datatypes. I changed it to an array of objects and everything worked just fine.