Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What are Object Events and how do I find them?

VBA How To

What are Object Events and how do I find them?

by  SkipVought  Posted    (Edited  )
There are various Chart, Worksheet and Workbook Events in Excel 97+, Document Events in Word, Application Events in Outlook (nothing that I can find in Power Point other than UserForms). And UserForms also have events.

There is a skeleton procedure already set up for each event. Here's how to find these Event Procedure Skeletons...

1. alt+F11 - activates the Visual BASIC Editor

2. ctr+R - activates the Project Explorer

3. In the Project Explorer, Open Microsoft Excel Objects

4. Right click the object of choice (Chart, Worksheet or Workbook) and select View Code from the Pop-Up Menu

5. Select the Object DropDown in the upper left-hand corner of the Code Window (F7 activates Code Window)
6. From the Object DropDown, select either Chart, Workbook or Worksheet Object.

7. Select the Procedure DropDown in the upper right-hand corner of the Code Window
8. From the Procedure DropDown, select the Event that you want to control.

9. In the Event Skeleton in the Code Window, enter your code.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top