Custom VBA Class Development
Learn to build classes using VBA, making it easier to encapsulate and manage entities in your applications. Add properties, methods, and events to your classes, and then consume the classes as you create code. Focus on specific class-based features, such as collection classes and custom events, and learn to create dynamic data structures using VBA classes.
What you'll learn
It's possible to create VBA applications for Microsoft Office and other VBA hosts without ever delving into the concepts of creating and using classes, but by skipping this important and useful functionality, you deny yourself one of the best ways to create scalable, maintainable applications. By encapsulating entities in discrete classes, you make it easier to ensure that generalized code doesn't interact inappropriately with your data. In this course, you'll learn to create and consume VBA classes, adding your own custom properties, methods, and events. You'll learn to handle specific class-based issues, such as orphaned objects and memory leaks, creating custom events and handling those events, and wrapping the Collection object in a class to extend and protect it. You'll also learn how to create standard dynamic data structures like stacks, queues, and linked lists using VBA, and you'll be astonished at how easy it is to create these using VBA classes.
Table of contents
- Introduction 1m
- Assumptions 2m
- Motivating Classes 7m
- Working With Word.Application 10m
- Creating a Class 5m
- Creating a Class Demo 3m
- Simple Property 2m
- Simple Property Demo 1m
- Creating Methods 2m
- Creating Methods Demo 3m
- Property Procedures 5m
- Property Procedures Demo 8m
- Property Set 2m
- Property Set Demo 2m
- Property Issues 5m
- Creating Enumerated Values 2m
- Creating Enumerated Values Demo 5m
- Initialize and Terminate Events 1m
- Initialize and Terminate Events Demo 3m
- Important Observations 3m
- Summary 1m
- Introduction 1m
- Built-in Collection Classes 2m
- Built-in Collection Classes Demo 6m
- Motivating Custom Collection Classes 2m
- Motivating Custom Collection Classes Demo 1m
- Finishing the Custom Collection Class 2m
- Finishing the Custom Collection Class Demo 5m
- Extending the Collection Class 1m
- Extending the Collection Class Demo 3m
- Missing Features 2m
- Missing Features Demo 3m
- Using a Collection Class 4m
- Summary 1m
- Introduction 0m
- References as Pointers 5m
- Successful Termination Demo 2m
- Simple Termination 2m
- Failed Termination Demo 1m
- Failed Termination and Cleanup 2m
- Cleanup Demo 2m
- Cleanup Successful 1m
- Cleanup Summary 1m
- Handling Events 4m
- Handling Events Demo 3m
- Reviewing Event Handling 3m
- Event Blocking Demo 2m
- Raising Custom Events 4m
- Custom Events Demo 3m
- Sinking Events 1m
- Sinking Events Demo 3m
- Summary 1m
- Introduction 5m
- Linear Data Structures 10m
- Introducing Stacks 2m
- Stack Code Introduction 2m
- Stack Operations 3m
- Stack Code Demo 4m
- Introducing Queues 2m
- Queue Code Introduction 1m
- Queue Operations 6m
- Queue Code Demo 1m
- Linked List Introduction 2m
- Linked List Code Introduction 1m
- Linked List Operations 16m
- Linked List Code Demo 1m
- Summary 2m