我想按照https://msdn.microsoft.com/en-us/library/office/ff767482.aspx中的指南創建事件對象。Visio clsEventSink庫
mEventSink作爲clsEventSink
我收到一個編譯錯誤:當我創建爲變量的出現問題的用戶定義類型沒有定義
我試圖尋找這個庫,但我不能找到一個給我一個解決方案的來源。
我想按照https://msdn.microsoft.com/en-us/library/office/ff767482.aspx中的指南創建事件對象。Visio clsEventSink庫
mEventSink作爲clsEventSink
我收到一個編譯錯誤:當我創建爲變量的出現問題的用戶定義類型沒有定義
我試圖尋找這個庫,但我不能找到一個給我一個解決方案的來源。
我猜你要麼放在所有的代碼到一個單一的標準模塊,兩個獨立的,或沒有正確改名類模塊,但是從你需要創建一個類模塊的指令說明(即,不是一個標準模塊):
Copy this sample code into a new class module in VBA or Visual Basic, naming the module clsEventSink. You can then use the event-sink module that follows to create an instance of the clsEventSink class and an Event object for the MouseMove event that sends notifications of event firings to the class instance.
所以代碼的第一部分,它實現了IVisEventProc
接口,進入類模塊和第二部分,與所述初始化方法進入一個標準模塊。
嗨,約翰謝謝你的提示。我已經設法解決我的問題。 – NiTuRen