O'Reilly logo

Excel 2016 Formulas by Richard Kusleika, Michael Alexander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 24 VBA Programming Concepts

In This Chapter

  • Understanding VBA’s language elements, including variables, data types, and constants
  • Using the built-in VBA functions
  • Controlling the execution of your Function procedures
  • Using ranges in your code

To truly go beyond recording macros and into writing your own custom functions, it’s important to understand the underlying Visual Basic for Applications (VBA) typically used in Excel macros.

This chapter starts you on that journey by giving you a primer on some of the objects, variables, events, and error handlers you will encounter in the examples found in this book.

A Brief Overview of the Excel Object Model

VBA is an object-oriented programming language. The basic concept of object-oriented programming is that a software application (Excel in this case) consists of various individual objects, each of which has its own set of features and uses. An Excel application contains cells, worksheets, charts, pivot tables, drawing shapes—the list of Excel’s objects is seemingly endless. Each object has its own set of features, which are called properties, and its own set of uses, called methods.

You can think of this concept just as you would the objects you encounter every day, such as your computer, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required