Throwback Thursday: October 24, 2024

In today's edition of Throwback Thursday, we demystify the WithEvents keyword in VBA and then dive deep into some practical uses for it.

Throwback Thursday: October 24, 2024

With over a million words scattered across more than 1,300 articles on this blog, you've probably missed a few things here.

That’s why each week in "Throwback Thursday," we’ll revisit some standout posts. Expect a blend of my personal favorites, insightful articles from other great minds, and a touch of coding humor to keep things light.


Highlights from NoLongerSet.com

Event-Driven Programming in VBA
Event-driven programming may sound complicated, but the concept is really quite simple.
Raising Custom Events in VBA
This quick tutorial will have you writing custom events in VBA in no time.
Using WithEvents to Encapsulate Event Handling Code
You don’t need to call the event handler for every control to handle its events. Instead, you can use WithEvents to encapsulate that code in a class module.
Handling Multiple Control Types in a WithEvents Class
Using WithEvents to subclass form controls is a powerful technique. Here’s one way to handle multiple control types in a single class.

Wisdom from Around the Web

One of the most comprehensive set of articles on using WithEvents within MS Access comes from Ramachandran Pillai (better known on the web as a.p.r. pillai).

The article below is an introduction to some of his concepts. It includes links to 14 additional WithEvents tutorials, so there's plenty to sink your teeth into.

WithEvents Ms-Access Class Module Tutorial
Learn Advanced Microsoft Access Programming Techniques, Tips and Tricks

He also presented on the topic a few months back for the Access Europe User Group. The presentation is available on YouTube:

Cover image generated by Ideogram

All original code samples by Mike Wolfe are licensed under CC BY 4.0