Argument | Description | |
vbproject | If vbproject points to Nothing, the object that is returned will supply events for the References collections of all VBProject objects in the VBProjects collection. If vbproject points to a valid VBProject object, the object that is returned will supply events for only the References collection for that project. |
Private WithEvents X As ReferencesEvents
Sub Test()
Set X = Application.VBE.Events.ReferencesEvents
End Sub
Private Sub X_ItemAdded(ByVal Reference As VBIDE.Reference)
' Put code to support item addition here
End Sub
Private Sub X_ItemRemoved(ByVal Reference As VBIDE.Reference)
' Put code to support item removal here
End Sub