Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mark Choman Associate Professor - CIS Department Luzerne County Community College

Similar presentations


Presentation on theme: "Mark Choman Associate Professor - CIS Department Luzerne County Community College"— Presentation transcript:

1 Mark Choman Associate Professor - CIS Department Luzerne County Community College

2 "This session describes the Office 2010 Visual Basic for Applications (VBA) programming environment. Knowing VBA lets you perform tasks that cannot be done with the Ribbon. Participants explore a handful of useful, predesigned VBA examples for Word, Excel, Access, and PowerPoint." 2

3 Word, Excel, Access, and PowerPoint 2010 include their own "object model" that exposes their underlying functionality. You can tap into these objects using Visual Basic for Applications (VBA) to handle tasks not available in the Ribbon or to simply do those tasks faster and more efficiently. 3

4 The VBA programming environment targets objects of Office 2010 applications. Like most objects, we can describe it with properties and discuss what methods/actions it can perform and when its events happen. As an analogy, consider a car as an object. Its properties would include its doors count, exterior color, etc.. Its methods/actions are moving forward and backward in response to a pedal press or gear shift change event. 4

5 Excel has hundreds of objects in its object model alone! One is the Application object. It has properties such as "Version" and "DefaultFilePath" and a "Workbooks" collection. Its methods/actions include "Calculate" and "Quit". Events are "SheetActivate" and "WorkbookOpen". 5

6 Objects often have subcategories of objects. Targeting the specific object you need to work with becomes important. For example, just below the Application object is the Workbook object. It has properties such as "Name" and "Sheets", and events such as "BeforeClose" and "BeforeSave". Likewise, the Worksheet object has its own properties, methods, and events. 6

7 Let's spend the next several minutes exploring VBA as we see examples from: Excel Word PowerPoint Access The remaining time will be devoted to building some VBA first-hand using Excel. 7

8 Learn more about Office 2010 VBA at: en-us/office/ee aspx en-us/office/ee aspx Thanks for attending! For any follow-up Q&A, me at: Mark Choman Please complete a session evaluation at: 8


Download ppt "Mark Choman Associate Professor - CIS Department Luzerne County Community College"

Similar presentations


Ads by Google