Core Office Development Lab

Version: 1.0.0

Description

The objective of this Hands-On Lab is to show that by combining the power and flexibility of core Microsoft Office application capabilities with a little bit of programming it is possible to develop solutions quickly and easily. In this HOL you will receive an introduction to Office development using Visual Basic for Applications (VBA) for working with data in Excel, document composition in Word and more.

Overview

By combining the power and flexibility of core Microsoft Office applications with a little bit of programming it is possible to develop solutions quickly and easily. In this HOL you will receive an introduction to Office development.

Objectives

The objective of this Hands-On Lab is to introduce you to core solution development techniques for Office 2010. In particular, you will

  • Learn how to connect Microsoft Excel to external data sources
  • See how to use Microsoft Query to create more sophisticated data connections
  • Create a codeless interactive data analysis solution in Excel
  • Receive an introduction to the Visual Basic Editor and VBA to create a user form that interacts with an Excel workbook
  • Use VBA with the Excel Object Model
  • Experience document assembly using Word content controls and VBA

System Requirements

You must have the following items to complete this lab:

  • Microsoft Access 2010
  • Microsoft Excel 2010

Setup

This Hands-On lab assumes that the Hands-On lab files are located in a folder named %Office2010DeveloperTrainingKitPath%\Labs\VBA\Source on the drive you downloaded to. If you haven’t already done so, perform the following steps

  1. Open Windows Explorer
  2. Navigate to the Source folder for this lab

Exercises

This Hands-On Lab comprises the following exercises:

  1. Setting up a Data Connection in Excel
  2. Creating and using Parameterized Queries in Excel
  3. Create a no-code, data-bound interactive display in Excel
  4. Use VBA to create a user form
  5. Using VBA with the Excel Object Model
  6. Document assembly with Word content controls and VBA

Estimated time to complete this lab: 75 minutes.

Starting Materials

This Hands-On Lab includes the following starting materials.

  • Access Database. The lab provides the database that you can use as starting point for the exercises.
    • %Office2010DeveloperTrainingKitPath%\Labs\VBA\Source\Database\Budget.accdb: The Budget database contains sample budgeting and forecasting information that is accessed by this labs exercises.
  • Forecasting Workbook. The lab provides a workbook to use as a starting point for the Exercises 2 and 3.
    • %Office2010DeveloperTrainingKitPath%\Labs\VBA\Source\Starter Files\Forecasting.xlsm: The Budget database contains sample budgeting and forecasting information that is accessed by this labs exercises.
    Note:
    See the Completed Files folder for a completed example of the Forecasting workbook.