In a c# com interface, one can define a default member like this
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[ComVisible(true)]
public interface IMyComClass
{
[DispId(0)] string Item{get;}
}
with IDispatch (or dual) everything works as expected, and from VBA I can omit the property like this
Dim o1 As New MyComClass
Debug.Print o1 'this is equivalent to o1.Item
but if I define the interface only as IUnknown, it doesn't work. In the excel Object Browser I still see the property marked with the 'blue dot', and labelled as 'Default Member'. But .Item must be explicitly specified in VBA code.
Is there a way to have default properties in IUnknown behave like in IDispatch?