1 / 8

"Getting Started With Microsoft Office 2010 VBA" Tuesday, 10/04/2011, 3:45 PM to 4:45 PM

"Getting Started With Microsoft Office 2010 VBA" Tuesday, 10/04/2011, 3:45 PM to 4:45 PM. Mark Choman Associate Professor - CIS Department Luzerne County Community College http://www.luzerne.edu. Session Description.

ide
Télécharger la présentation

"Getting Started With Microsoft Office 2010 VBA" Tuesday, 10/04/2011, 3:45 PM to 4:45 PM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. "Getting Started With Microsoft Office 2010 VBA"Tuesday, 10/04/2011, 3:45 PM to 4:45 PM Mark Choman Associate Professor - CIS Department Luzerne County Community College http://www.luzerne.edu

  2. Session Description • "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."

  3. What Is VBA? Why Use It? • 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.

  4. The VBA Object Models • 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.

  5. The VBA Object Models • 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".

  6. The VBA Object Models • 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.

  7. In-session Examples • 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.

  8. To Learn More • Learn more about Office 2010 VBA at: • http://msdn.microsoft.com/en-us/office/ee722026.aspx • Thanks for attending! For anyfollow-up Q&A, email me at: • Mark Chomanmchoman@luzerne.edu • Please complete a session evaluation at: • http://www.league.org/stemtech/evaluation

More Related