I am making a COM for Excel with C#.
When generating an instance of a member class on the VBA side, it is stated as follows:
Although the explanation is longer, the UBound() value is returned correctly depending on the number of elements in UBound(param.Members above, but an error occurs when trying to access each element.
The error message is as follows:
Wrong number of arguments or invalid property assignment
How can I access each element?c# vba com
In VB, UBound is not "number", but "maximum number of subscripts".
In the original C# code, for "new Member" (number of elements 2), there is a code that expects "member=...", but what is the number of elements?
If the number of elements 2 is correct and the LBound is 1, then the subscripts are 2 arrays that can be accessed by 1 and 2.Please check out LBound as well.
I haven't tried it, but once I get param.Members in Variant, it might work.
© 2022 OneMinuteCode. All rights reserved.