Handling Worksheet Control Events Using a Class Module

Introduction

When utilising controls from the Control Toolbox on worksheets, often one needs to use event code to handle the actions a user takes with them. If however a large number of controls is used, this may become unwieldy because one has to add an event sub for each one of them. This article gives an example how one can use a class module with a single event subroutine for a set of (identical) controls.

Table Of Contents

  1. Preparations
  2. Class Module
  3. Hooking up
  4. Conclusion