I have created a COM library in c# which I am consuming from VBA in Excel. My library has a property which returns an array of objects but when I try to access the elements of the array I get this compile error in VBA: "Wrong number of arguments or invalid property assignment".
// C# property
Foo[] FooArray { get { return _fooArray; } }
' Client VBA code
Dim obj as new Bar
Dim f as Foo
set f = obj.FooArray(0)
I tried returning an array of strings and saw the same error.