Excel 2019 Bible

(singke) #1

Part VI: Automating Excel


What You Can Do with VBA
VBA is an extremely rich programming language with thousands of uses. The following list contains
just a few things you can do with VBA macros. (Not all of these tasks are covered in this book.)

■ (^) Insert boilerplate text. If you need to enter standard text into a range of cells, you can
create a macro to do the typing for you.
■ (^) Automate procedures that you perform frequently. For example, you may need to
prepare a month-end summary. If the task is straightforward, you can develop a macro to
do it for you.
■ (^) Automate repetitive operations. If you need to perform the same action in 12 different
workbooks, you can record a macro while you perform the task once—and then let the
macro repeat your action in the other workbooks.
■ (^) Create custom commands. For example, you can combine several Excel commands so
that they’re executed from a single keystroke or from a single mouse click.
■ (^) Create a simplified “front end” for users who don’t know much about Excel. For
example, you can set up a foolproof data-entry template.
■ (^) Develop new worksheet functions. Although Excel includes a wide assortment of built-in
functions, you can create custom functions that greatly simplify your formulas.
■ (^) Create complete macro-driven applications. Excel macros can display custom dialog
boxes and respond to new commands added to the Ribbon.
■ (^) Create custom add-ins for Excel. Add-ins are programs that extend Excel’s capabilities.
Displaying the Developer Tab
If you plan to work with VBA macros, make sure you can see the Developer tab on the Excel
Ribbon. The Developer tab, which does not appear by default, contains useful commands for
VBA users (see Figure 42.1). To display this tab, follow these steps:
FIGURE 42.1
The Developer tab

Free download pdf