![](/img/trans.png)
[英]Selenium Server Automation - Object doesn't support property or method 'attachEvent'
[英]VBA and “Class doesn't support Automation or does not support expected interface”
我有ComVisible類的.NET程序集。 幾天前(我可以通過git找到那個時刻發生的事情) - Excel不再看到這個類了。 所以:
我有界面
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface MyInterface { ... }
和班級
[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[ProgId("MyClass.Id")]
public class MyClass { ... }
Excel通過創建實例
Dim c as MyClass
Set c = New MyClass
之前一切都像魅力一樣,但刪除了一些方法(從界面和類)后Excel很瘋狂 - 它向我顯示錯誤Class doesn't support Automation or does not support expected interface
。 哪里可以成問題?
該死的三次。 對於未來的人:在從COM庫中刪除方法/屬性之后,您應該在Excel的文件中重新添加對.tlb文件的引用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.