Application object
Informs INVOICES that there is an COM automation object that can supply event handlers. When an event is fired and there is an event server object defined by SetEventServerObject, the server object is queried for a function with the same name as the event. If such a function is found, it is called with the parameters defined for the event.
Note
If event handlers are defined both internally and in an event server object, both are used. The internal ones are used first, then the external event server object is used.
Although INVOICES creates a function called OnInvoiceComplete for internal VBA, call it InvoiceComplete when you use it in an external event server object.