jump to navigation

Creating UserForms Programmatically February 7, 2006

Creating UserForms Programmatically
and Handling Events with a User-Defined Class

This post contains an example Excel VBA file that demonstrates creating a UserForm programmatically and handling events with a user defined class. This is especially handy for creating forms with many similar controls. The file contains examples with Buttons, ComboBoxes, and TextBoxes. The figures below show the form with a button grid and the response of the event handler. Download the Excel file: UserFormProgEvents2.xls

ButtonGrid Event

This is an extension of work found here: