Introduction to VBA Programming Training IVBAP001
- Course Code : IVBAP001
- Duration : 4 Days
- Price : 2,475 GBP
- Level: Intermediate
- Language: English
Course Content
This hands-on, two-day course is designed to give you a detailed understanding of how programming in Visual Basic for Applications (VBA) can significantly increase productivity. You will learn how to automate repetitive tasks, build user interfaces, develop custom Microsoft Office solutions, and enhance overall productivity.
Delivery Method
After-course instructor coaching benefit.
Learning Tree end-of-course exam included.
After-course computing sandbox included.
Have questions about this course?
Benefits
Develop custom solutions, automate tasks, and increase performance.
Enhance the Office Ribbon with new functionality.
Exploit ActiveX controls to create functional and familiar UIs.
Troubleshoot code using debugging tools.
Secure your code and protect users from macro viruses.
Pre Requisites
Familiarity with Microsoft Office applications.
This course applies to all versions of Office from 2007 to 2016.
Course Outline
Introduction - Providing a Safe and Secure Environment
Introduction
The advantages of VBA:
Easy-to-use and versatile language.
Integrated with off-the-shelf products.
Macros: The First Step
Recording and executing macros.
Limitations and enhancing with VBA code.
Getting to Know the VBA Environment
The code design tools:
Project Explorer
Help system
Code Window
IntelliSense
Properties Window
Object Browser
The debugging tools:
Code stepping
Immediate Window
Breakpoints
Writing VBA Code
Event-driven programming:
The role of events in Windows.
Responding to events through event procedures.
Putting objects to work:
Properties
Methods
Events
Collections
Using With…End With.
Storing data in variables:
How and when to declare variables.
Selecting data types.
Fixed and dynamic arrays.
Constants.
Conditional branching:
If…Then…Else
Select…Case
Looping through code:
Do…Loop, While and Until
For…Next and For Each…Next
Building procedures:
Creating Sub and Function procedures.
Calling procedures.
Passing arguments to procedures.
Empowering VBA through the Application Object Models
Understanding object model structures:
Exploring the hierarchy with the Object Browser and Help.
Referencing specific objects.
Writing application-specific procedures:
Key objects within Excel, Word, and Outlook.
Creating templates and add-ins.
Exploiting the power of Automation:
Controlling one Office application while working in another.
Accessing data in databases using ActiveX Data Objects.
Building Intuitive User Interfaces
Using intrinsic dialogs:
Communicating with the user through the message box.
Gathering user information with the input box.
Utilizing the FileDialog object and Dialogs collections.
Creating customized dialogs with UserForm objects:
Command buttons
List and Combo boxes
Labels
Option buttons
Check boxes
Text boxes
Frames
Adding more functionality with advanced ActiveX controls.
Modifying menus and toolbars:
Simplifying user interaction with the CommandBar object.
Adding and removing CommandBarControl objects.
Providing a Safe and Secure Environment
Handling runtime errors:
The On Error GoTo structure.
Classifying errors with the Err object.
Executing with Resume, Resume Next, or Resume label.
Implementing security:
The dangers of macro viruses.
Macro security levels in Office.
Applying digital signatures to macros.
Password-protecting your VBA code.