Preface

Before we go any further, let's just clarify one fundamental point. Visual Basic for Applications (VBA) is the language used to program in Visual Basic (VB). VB itself is a development environment; the language element of that environment is VBA. Similarly, VBA is the language used to program all the applications in the Microsoft Office suite except Outlook, as well as a whole host of third-party applications. The VBA language (with a very few minor exceptions) is the same whether you're programming within VB or creating an application in a hosted VBA environment such as Word or Excel. Unless specifically noted, the language elements described in this book can be used exactly the same in both the retail version of VB and the hosted VBA environment; consequently throughout the book I often interchange the terms VB and VBA.

While it's important to emphasize that this book is a reference to a language component that's shared by VB and by applications that host VBA, it's also important to emphasize that it is not any of the following:

  • A reference guide to VB controls and to their properties, events, and methods. These belong to the Visual Basic environment and aren't part of VBA at all. They are, however, documented in the forthcoming Visual Basic Controls in a Nutshell, written by Evan S. Dictor and published by O'Reilly & Associates.

  • A reference guide to UserForms and their controls, all of which are defined by one or another version of the Microsoft Forms Library. Very ...

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.