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:


1. excel » Blog Archive » programming userforms - February 14, 2006

[…] This article shows some interesting examples of creating UserForms programatically. I would like to see also how to create a larger grid with row and column headings, scroll bars and drop down boxes. […]