J Choose View Properties Window to rename a module o

2. Enter the following into the class module: Public WithEvents xlApp As Application

The name of the variable, xlApp, can be any variable name. The WithEvents keyword exposes the events associated with the Application object.

3. xlApp is now available from that class module's Object drop-down list. Select it from the drop-down, and then click on the Procedure drop-down menu to the right of it to view the list of events that is available for the xlApps object type (Application), as shown in Figure 20.2.

■ For a review of the various Application Events, see "Application-Level Events," p. 156,in Chapter 8.

0 0

Post a comment