I have .NET assembly with ComVisible class. Some days ago (I can find that moment exactly, by git) something happened - Excel doesn't see anymore this class. So:
I have interface
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface MyInterface { ... }
and class
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[ProgId("MyClass.Id")]
public class MyClass { ... }
Excel creates the instance by
Dim c as MyClass
Set c = New MyClass
Earlier everything worked like a charm, but after deleting some methods (from interface and class) Excel is crazy - it shows me an error Class doesn't support Automation or does not support expected interface. Where can be a problem?
Damn three times. For the future guys: after removing methods/properties from your COM-library you should re-add reference to .tlb file in your Excel's file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With