Home / MS-Excel / General Formatting

Creating Custom VBA Dialog Boxes

VBA procedures are only as useful as they are convenient. There isn't much point in creating a procedure that saves you (or your users) a few keystrokes if you (or they) have to expend a lot of time and energy hunting down a routine. Shortcut keys are true time-savers, but some applications (such as Excel) have only a limited supply to dole out (and our brains can memorize only so many Ctrl+key combinations).

Instead, you need to give some thought to the type of user interface you want to create for your VBA application. The interface includes not only the design of the documents, but also two other factors that let the user interact with the model: dialog boxes and Ribbon commands. Although you certainly can give the user access to the application's built-in dialogs and Ribbon interface, you'll find that you often need to create your own interface elements from scratch. This tutorial starts you off by showing you how to use VBA's Microsoft Forms feature to create custom dialog boxes and input forms.