Chapter 16
UserForm Basics
IN THIS CHAPTER
Finding out when to use UserForms
Understanding UserForm objects
Displaying a UserForm
Creating a UserForm that works with a useful macro
A UserForm is useful if your VBA macro must pause and get some information from a user. For example, your macro may have some options that can be specified in a UserForm. If only a few pieces of information are required (for example, a Yes/No answer or a text string), one of the techniques discussed in Chapter 15 may do the job. But if you need to obtain more information, you must create a UserForm, which is what this chapter is all about.
Knowing When to Use a UserForm
You use a UserForm when a simpler method won't work, such as if you need to gather more information than an input box can provide or you need more control over how the user provides that information. For example, if you want to provide a quick way for a user to change the case of text in a cell, you might find a UserForm to be a better option than an input box.
In this example, you want to allow the user to change the text in a cell ...
Get Excel VBA Programming For Dummies, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.