I've created a library and can instance this and call methods from Excel VBA no problem, having registered it all for COM interop etc.
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("blahblahblah1")]
public interface IThingOne
{
bool Method1();
}
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("NameSpace.ThingOne")]
[Guid("blahblahblah2")]
public class ThingONe
{
public bool Method1() { //Whatever; }
}
If I apply STATIC keyword to the public class ThingOne
and the public bool Method1()
then how can I call these static methods? I can't instantiate them because they're static. I don't want to instantiate them. I just want to be able to call them.
The most I can get working in VBA is
Dim x as ThingOne
Can't do Dim x as new ThingOne
and then I can't get the methods to work e.g.
x.Method1
When I do the intellisense dropdown for x I get standard Equals, GetHashCode, GetType and ToString