Introduction
If you already know how to create subroutines in VBA, are happy declaring variables and can write loops and conditions without a qualm, this is the course for you! Assuming a good working knowledge of Visual Basic for Applications, the course shows you how to loop over collections, reference other applications, work with files in all of their manifestations, create your own classes (!) and much more. The course uses examples drawn from Excel, Access, Word and Outlook.
Course Contents
Revision of VBA
- Objects and collections
- Methods and properties
- Looping over collections
- Using object variables
Links to other applications
- Referencing other applications
- Instantiating objects
- Writing inter-application code
FileSystemObjects
- Referencing FileSystemObjects
- Working with files and folders
FileDialogs
- Using FileDialogs
- Allowing multiple selection
Working with text files
- Avoiding using INPUT/OUTPUT
- Reading and writing text files
Class modules
- What is a class?
- Designing classes
- Creating properties and methods
- Consuming classes
Advanced class modules topics
- Untyped collections
- Creating typed collections
- Creating event sinks
Linking to data*
- ADO or Access Database Engine
- Referencing the right library
- Opening and using recordsets
Arrays
- Creating and populating arrays
- Dynamic arrays
- The PRESERVE keyword
Passing arguments
- ByRef and ByVal
- Using optional arguments
- Using ParamArray
Advanced programming ideas*
- Using functions in code
- Recursive programming
- Enumerations
Working with shapes*
- Adding shapes
- Positioning shapes
- Formatting shapes
Please note that any items marked with a * will be covered if time allows.
Course Times
Usually 9.30am - 4.30pm. Course times will be confirmed in the Joining Instructions once the course has been booked.