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 much like VB controls, these belong to the hosted VBA IDE and aren't part of the language proper.

  • A reference guide to the individual object models of the Office suite. By accessing its host application's object model VBA can automate the application. Nevertheless, both conceptually and practically, VBA code and object model code are distinct components. Some of the object models, however, are documented in the Programming the...Object Model series, published by O'Reilly & Associates. These include Programming the Access/DAO Object Models, by Helen Feddema, and Programming the Word Object Model, by Julianne Sharer and Arthur Einhorn.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset