UserForms in VBA for Excel
Discover the amazing world of userforms. The only limit is your imagination and like all of us experienced Excel VBA developers you will get carried away at times. Userforms are created to allow the users of your applications to supply information that you will store in a database or use as parameters within your VBA procedures.
Userforms are fun to develop but they require a lot of investments (time and money). In other programming environments (databases, C++, COBOL....) developers are forced to use userforms because they don't have worksheets to play with. YOU ARE NOT. Never forget that you are working in Excel and a lot of things can be done on regular sheets saving you development time, costs and aggravations.
But sometimes the userform is what looks attractive to your user, they are what makes the clients call you back.....unless it gets too expensive.
You create a userform, you add controls and then you fine tune the design and fix the tab order.
Then you set the properties including the important ones "On Activate" and "On Close"
They are the command buttons, the list boxes, the combo boxes, the text boxes...and they all have properties. Here they are. What must happen when you click on a command button, when you change the value in a combo box? Here is the code to tell Excel about it.
The "CLICK " control where most of the code resides in a userform
The user just sees it and cannot submit any information with it. YOU are talking to the user
The user is now talking to you. I have rarely seen a userform without text boxes. The format is the challenge.
The BIG control. It is a drop-Down list.
When multiple choice is a necessity
The "True/False" controls to be used as a group with a frame
They are sexier than text boxes and sometimes make a difference in the clients' opinion of your talent.