Skip to Content
Excel® 2010 Workbook for Dummies®
book

Excel® 2010 Workbook for Dummies®

by Greg Harvey
September 2010
Beginner
408 pages
10h 23m
English
For Dummies
Content preview from Excel® 2010 Workbook for Dummies®

Chapter 22. Using the Visual Basic Editor

In This Chapter

  • Getting familiar with the Visual Basic Editor

  • Editing a macro in the Visual Basic Editor

  • Adding interactivity to a macro with a dialog box that processes user input

  • Creating and using user-defined functions in the Visual Basic Editor

  • Saving user-defined functions as Excel add-ins

Visual Basic for Applications (usually known simply as VBA) is the official programming language of Excel that you can use to edit as well as to write new macros. The key to editing and writing macros in Visual Basic for Applications is its editing program, the Visual Basic Editor (often abbreviated VBE). The Visual Basic Editor offers a rich environment for coding and debugging VBA code whose interface rivals that of Excel itself in terms of features and complexity.

In this chapter, you get a chance to practice using the Visual Basic Editor to edit macros that you've recorded (see Chapter 21) as well as to enhance their basic functionality through the addition of interactivity. In addition, you get practice using the VBE to create your own custom functions known as user-defined functions (often abbreviated UDF).

Using the Visual Basic Editor

You can open the Visual Basic Editor in one of three ways:

  • Click the Visual Basic button in the Code group at the very beginning of the Developer tab on the Ribbon (Alt+LV).

  • Press Alt+F11.

  • Open the Macro dialog box (Alt+F8), select a macro to edit, and then click the Edit button.

Figure 22-1 shows the arrangement of the ...

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Using Microsoft® Excel® 2010

Using Microsoft® Excel® 2010

Tracy Syrstad, Bill Jelen
Microsoft® Excel 2010 On Demand

Microsoft® Excel 2010 On Demand

Steve Johnson - Perspection Inc.

Publisher Resources

ISBN: 9780470489604Purchase book