Microsoft Excel VBA Course: A Masterclass
Microsoft Visual Basic. Master programming for Windows.
Learn Microsoft Visual Basic the smart way with Microsoft Visual Basic courses at CCE, The University of Sydney.
This three-day advanced course shows you how to use a combination of the Microsoft Excel Object Model and VBA to improve your productivity, adding power and flexibility to spreadsheets by creating user-defined functions and macros. Basic knowledge of Microsoft Excel is required, and you should strongly consider completing the one-day Microsoft Excel VBA Course: An Introduction prior to undertaking this course. All technical terms and concepts will be explained simply.
Upon completion of this short course, you should be able to:
- Create, understand and improve recorded macro code.
- Gain a deeper understanding of the Microsoft Excel object model (types, properties and methods) and manipulating it with VBA.
- Create a custom form complete with controls and event procedures.
- Understand procedure and variable/object/identifier scope.
- Divide and conquer complex logic with the implementation of “helper” procedures.
- Learn more repetition structures in VBA and the circumstances in which to apply them.
- Understand the required features of successful nested repetition.
- Become familiar with a variety of VBA functions.
- Create a user form and manipulate it with code.
- Create procedures that execute automatically in response to user manipulation of Excel (Event Procedures).
- Write a variety of error handling routines.
- Complete your proficiency in debugging.
This training course will provide a brief recap of the course material covered in Microsoft Excel VBA Course: An Introduction, and then cover the following topics:
- Printing to the debug window and using it to interact with your variable values.
- The Locals and Watch windows, and using them interactively.
- Editing how watched variables/identifiers are reported on.
- Changing the executable line.
- Writing algorithms that affect the Excel Object Model.
- Choosing procedure types and the “rules” for choosing the correct procedure type.
- Return types of functions and parameter types.
- Scope of Private vs Public Procedures.
- Hiding a Public Sub from the Excel interface.
- Multiple parameters in procedures.
- Passing Variables to other procedures by reference or by value and when to use those techniques.
Primitive/Value Data Types
- Implicit variable declaration vs enforcing explicit declaration of variables in your code with Option Explicit.
- Working with the VBA data type Variant and Date.
- Functions to convert one type to another type.
- Implicit Data Type Conversion in VBA.
- VBA Functions to check the data type of an identifier.
- The Like Operator.
- Guidelines for Module Level and Global Level Variables.
- Problems with the VBA Input Box.
- The Message Box as a Statement and Function.
- More on Enumerations and Constants (we can’t ignore them, they are everywhere).
Reference Types and the VBA Excel Object Model
- The differences between Value/Primitive Types and Reference Types.
- The VBA Set Keyword.
- Classes, Objects and Variables vs Types and Identifiers.
- The purpose and structure of all object-oriented programming languages.
- Using existing identifiers methods and properties.
- Declaring your own identifiers of types in the object model.
- The Range Property and selecting Ranges.
- Stopping Screen Flicker produced by recorded Macros.
- Collection Object common properties and methods.
- The Add method and the Active object.
- Working with the Workbooks, Worksheets and Cells Collections.
- Methods that Return Objects.
- More Constants and Enumerations in the Excel Object Model.
- The Excel Input Box and its advantages.
- When to use Excel interface functions in VBA code.
Repetition (Iteration) Structures
- More repetition structures in VBA including when to nest loops.
- Endless loops and how to deal with them.
- Referencing (using) libraries of code exposed by other systems (Word, Outlook, ADO etc.).
- Referencing (using) procedures you have written in other Workbooks.
- A complete guide to error handling in VBA (telling code what to do if it breaks).
- Securing your project.
- Building a form with controls including textboxes, dropdown lists, option buttons and command buttons.
- Making a form interact with spreadsheets through the setting of properties and through code.
- Truly automating Excel with Event Procedures and when not to.
This short course is delivered as presenter-taught computer-based training.
This short course is designed for users who wish to learn how to use the inbuilt programming language in Microsoft Excel to enhance their worksheets and automate processes. Please note, this course has been designed as a follow-on course from the one-day Microsoft Excel VBA Course: An Introduction.
Furthermore, you should have basic knowledge Microsoft Excel and programming principles and practice. If you are not a touch typist, you will be asked to write your answers in a book provided. Please bring a pen.
- Free repeat class - Conditions apply
- Free USB flash drive
- Expert trainer
- Dedicated computer for every student
- Small class size
- Student notes – yours to keep
- Certificate of completion