Using Events

Each level consists of several types of events, and memorizing the syntax of them all would be a feat. Excel makes it easy to view and insert the available events in their proper modules right from the VBE.

When a ThisWorkbook, Sheet, Chart Sheet, or Class module is active, the corresponding events are available through the Object and Procedure drop-downs, as shown in Figure 8.1.

Figure 8.1

The different events are easy to access from the VBE Object and Procedure drop-downs.

Figure 8.1

The different events are easy to access from the VBE Object and Procedure drop-downs.

After the object is selected, the Procedure drop-down updates to list the events available for that object. Selecting a procedure automatically places the procedure header (Private Sub) and footer (End Sub) in the editor, as shown in Figure 8.2.

Figure 8.2

The procedure header and footer are automatically placed.

Figure 8.2

The procedure header and footer are automatically placed.

0 0

Post a comment