Tutorial on Excel Macros (VBA)      

Excel VBA Consulting

VBA Excel help

Excel functions and formulas


VBA for Excel Tutorial


VBA for Excel Sitemap


VBA for Excel Solutions



Introduction to VBA for Excel


History of VBA for Excel









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.

Developing Userforms and Adding Controls

You create a userform, you add controls and then you fine tune the design and fix the tab order.

Userforms Properties and VBA Code

Then you set the properties including the important ones "On Activate" and "On Close"

Excel VBA Controls' Properties and VBA Code

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.

Properties and VBA code for Command Buttons

The "CLICK " control where most of the code resides in a userform

Properties and VBA code for Labels

The user just sees it and cannot submit any information with it. YOU are talking to the user

Properties and VBA code for Text Boxes

The user is now talking to you. I have rarely seen a userform without text boxes. The format is the challenge.

Properties and VBA code for Combo Boxes

The BIG control. It is a drop-Down list.

Properties and VBA code for List Boxes

When multiple choice is a necessity

Properties and VBA code for Check Boxes, Option Buttons and Frames

The "True/False" controls to be used as a group with a frame

Properties and VBA code for Spin Buttons

They are sexier than text boxes and sometimes make a difference in the clients' opinion of your talent.


Excel VBA Consulting

Excel macros help

Exxcel functions and formulas