Skip to main content

Excel VBA Programming For Dummies, 3rd Edition

Excel VBA Programming For Dummies, 3rd Edition

John Walkenbach

ISBN: 978-1-118-49037-2

Mar 2013

408 pages


Take control of your spreadsheets and use VBA to create your own custom Excel applications

Author and Excel guru John Walkenbach, known to his devoted fans as "Mr. Spreadsheet," guides you through taking your Excel skills to the next level by creating your own customized spreadsheet solutions using Visual Basic for Applications (VBA). This updated edition of this bestselling book shows you how to use VBA, write macros, customize your Excel apps to look and work the way you want, avoid errors, and more.

  • Introduces you to a wide array of new Excel 2013 options, beginning with the most important tools and operations for the Visual Basic Editor
  • Provides an overview of the essential elements and concepts for programming with Excel, including using VBA to customize your applications and automate functions
  • Shares techniques for handling errors, debugging, working with range objects, controlling flow, and much more
  • Zeroes in on creating custom dialog boxes, toolbars, and menus

Add a personal touch to your spreadsheets and present your data the way you want with Excel VBA Programming For Dummies, 3rd Edition.

Introduction 1

Part I: Getting Started with Excel VBA Programming 9

Chapter 1: What Is VBA? 11

Chapter 2: Jumping Right In 21

Part II: How VBA Works with Excel 31

Chapter 3: Working in the Visual Basic Editor 33

Chapter 4: Introducing the Excel Object Model 53

Chapter 5: VBA Sub and Function Procedures 67

Chapter 6: Using the Excel Macro Recorder 79

Part III: Programming Concepts 91

Chapter 7: Essential VBA Language Elements 93

Chapter 8: Working with Range Objects 115

Chapter 9: Using VBA and Worksheet Functions 129

Chapter 10: Controlling Program Flow and Making Decisions 143

Chapter 11: Automatic Procedures and Events 163

Chapter 12: Error-Handling Techniques 183

Chapter 13: Bug Extermination Techniques 197

Chapter 14: VBA Programming Examples 209

Part IV: Communicating with Your Users 231

Chapter 15: Simple Dialog Boxes 233

Chapter 16: UserForm Basics 249

Chapter 17: Using UserForm Controls 265

Chapter 18: UserForm Techniques and Tricks 283

Chapter 19: Accessing Your Macros through the User Interface 307

Part V: Putting It All Together 327

Chapter 20: Creating Worksheet Functions — and Living to Tell about It 329

Chapter 21: Creating Excel Add-Ins 347

Part VI: The Part of Tens 359

Chapter 22: Ten VBA Questions (and Answers) 361

Chapter 23: (Almost) Ten Excel Resources 365

Chapter 24: Ten VBA Do’s and Don’ts 369

Index 375

All Example Files
Chapter 09 Example Files
Chapter 10 Example Files
Chapter 11 Example Files
Chapter 12 Example Files
Chapter 14 Example Files
Chapter 15 Example Files
Chapter 16 Example Files
Chapter 17 Example Files
Chapter 18 Example Files
Chapter 19 Example Files
Chapter 20 Example Files
Chapter 21 Example Files
Creating a Name Report in Excel