Course length

3 days

Why come on this course?

In this course you will learn the skills to enable you to use the Visual Basic for Applications (VBA) programming language to simplify or automate activities and tasks using the Microsoft Office 2010-2019 applications. The course covers examples in Excel, Access, Word and PowerPoint 2010-2019.

Who is it for?

This course is designed for people looking to gain enhanced skills to apply VBA to develop macros to work with Office applications. You will work with the application object models, manipulate data across applications and manage files and folders using VBA.

Prerequisites

  • Attend the Office 2010-2016 VBA Introduction course, or have equivalent knowledge i.e. able to write macros which include variable declarations with appropriate scope, intrinsic functions, decision making structures and repeating code actions
  • Working knowledge of Excel, Access, Word and PowerPoint in any of the versions 2010-2016
  • Understand how to create Charts, PivotTables and apply filters and sorting to data sets

What will I learn?

  • Understand MS Office Object Hierarchies and the Object Browser
  • Work within an MS Office Application
  • Use User Defined Types, Classes and Arrays
  • File and Folder Management using VBA
  • Interaction between MS Office Applications
  • Work with the Excel Range Object
  • Work with Data in Excel
  • Present Data in Excel
  • Programming in Access with VBA

Course contents

MS Office Object Hierarchies and the Object Browser

  • Objects, Collections and Hierarchies
  • Properties, Methods and Events
  • Using the Object Browser
  • MS Office Application Reference Libraries

Working within an MS Office Application

  • VBA or Macro Recorder
  • Special Macros
  • Object Variables
  • Binding
  • Application Object Examples

User Defined Types, Classes and Arrays

  • Introduction to User Defined Types (UDTs)
  • Creating a User Defined Type
  • Creating a Class
  • Creating Array Variables
  • Using Arrays in Code

File and Folder Management using VBA

  • Using the FileSystemObject
  • Handling Folders using VBA
  • Create a Folder
  • Move, Rename, Copy or Delete a File
  • File or Folder Properties and Attributes

Interaction between MS Office Applications

  • Classes and References
  • Working with Objects in another Application
  • Editing Documents across MS Office

Working with the Excel Range Object

  • Range Objects Defined
  • Referencing Ranges using VBA
  • Dynamic Range Handling
  • Copying or Moving Range Data

Working with Data in Excel

  • Importing Data from a Delimited File or Web Page
  • Excel and ADO
  • Data Types or Formatting
  • Validating Data
  • Filtering and Sorting Data with VBA
  • Using Worksheet Database Functions
  • Excel Tables

Presenting Data in Excel

  • Apply Conditional Formatting with VBA
  • Working with Charts
  • Pivot Tables

Programming Access with VBA

  • Navigating the Access Object Hierarchy
  • Understanding Access Collections
Contact Alpha Training