For help on a particular object or event, select it in the Object Browser and press F1 for Help on that topic (note that not all events are documented -- you may have to access event information by going through the object to which the event belongs.Another method to determine what events are available is to create an empty class module, and enter the following code: elements in the left side dropdown at the top of the code window.Events and Event Procedures were introduced in Excel97. Events and event procedures are the same for versions 97 through 2007.No significant changes have been made to the event model since its introduction in Excel97.
You should write your events procedures such that this distinction does not matter.All the events for the selected item in the left dropdown will be listed in the right dropdown.If you see an item of interest, let go of the mouse button and the VBA editor will insert that event's procedure declaration in the code module.This will open the VBA Editor to the code module associated with that worksheet.In that code window you will see two dropdown boxes at the top of the code window, as shown below: Change the procedure, you can add any code that you want to take place when a cell value is changed.When you change this setting, VBA will insert the procedure shell in the code module for you, ensuring that the procedure is properly declared.Under no circumstances should you change anything in the Event Code Location For sheet (both worksheet and chart sheet) level events, the event procedure code must be placed in the Sheet module associated with that sheet.You must not alter the name or parameter list of an event procedure. The events are "hard coded" into the object, such as a Worksheet, and may not be changed.The VBA Editor will automatically insert the correct procedure declaration. (You can, however, create custom events for your own classes. There are many events that are defined in a Worksheet object, the Workbook object, and the Excel Application object itself.This is why it is good practice to let the VBA Editor insert your procedure shell. Getting Started With Events The easiest way to start with events and event procedures is to allow the VBA editor to build the shell code for you.In Excel, right click one of the sheet tabs at the bottom of the main window and choose from the pop-up menu.