Skip to Content
Excel VBA Programming For Dummies, 6th Edition
book

Excel VBA Programming For Dummies, 6th Edition

by Dick Kusleika
February 2022
Beginner to intermediate content levelBeginner to intermediate
432 pages
9h 21m
English
For Dummies
Content preview from Excel VBA Programming For Dummies, 6th Edition

Chapter 16

UserForm Basics

IN THIS CHAPTER

Bullet Finding out when to use UserForms

Bullet Understanding UserForm objects

Bullet Displaying a UserForm

Bullet 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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Excel VBA Programming For Dummies, 5th Edition

Excel VBA Programming For Dummies, 5th Edition

Michael Alexander, John Walkenbach

Publisher Resources

ISBN: 9781119843078Purchase Link