2016-09-14 41 views

回答

1

我猜你要麼放在所有的代碼到一個單一的標準模塊,兩個獨立的,或沒有正確改名類模塊,但是從你需要創建一個模塊的指令說明(即,不是一個標準模塊):

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接口,進入類模塊和第二部分,與所述初始化方法進入一個標準模塊。

+0

嗨,約翰謝謝你的提示。我已經設法解決我的問題。 – NiTuRen