evt.cls
The class module is needed to declare a class that receives the events, here: evtReceiver
and its method(s) which will be called when the associated event is raised.
option explicit
public withEvents evtReceiver as application
private sub evtReceiver_slideShowBegin(byVal wn as slideShowWindow) ' {
debug.print "slide show started at " & now()
end sub ' }
Note: the name of the class module (here: evt
) is needed in the regular module, see below.
Module
The regular module is needed to declare a
variable whose type corresponds to the name of the class module (here
evt
), to create an instance of that object with
new
and to assign
application
to the variable's
evtReceiver
member.
option explicit
private evt_ as evt
sub initEvt ' {
set evt_ = new evt
set evt_.evtReceiver = application
end sub ' }