End Function ReferencesEvents Object

In a similar manner to the way in which the CommandBarEvents object provides the Click event for a command bar, the ReferencesEvents object provides two events related to the References collection of a VBProject. The ReferencesEvents object appears to be redundant — all of the events it handles are also included in the References object of a VBProject. The only difference (apart from the definition) is that the ReferencesEvents object works with a VBProject object instead of the References collection of a VBProject. Note that a VBProject is compiled when a Reference is added or removed, resulting in the loss of any variables and instances of classes. Hence, a VBProject cannot monitor its own References events.

0 0

Post a comment