RAISEEVENT statement  

Purpose

Call Event Handler code.

Syntax

RAISEEVENT ObjVar.Method()

Remarks

The RAISEEVENT statement is used to call event handler code from an Event Source.  RAISEEVENT may only appear within a class which declares the Event Source interface.  The concept of RAISEEVENT is very similar to the CALL statement, but it may only be used to execute event procedures:

RaiseEvent Status.Progress(10) ' advise the code is 10% done

It should be noted that RAISEEVENT does not reference an object variable at all, because it calls any and all event handlers which are currently subscribed to these events.  Instead, it references the interface name (in this case "Status"), followed by the name of the Event Method to be executed (in this case "Progress").

See also

CLASS, INTERFACE (Direct), INTERFACE (IDBind), Just what is COM?, EVENTS, OBJECT RAISEEVENT, What is an object, anyway?, What are Connection Points?