Thomson Course Technology, 2007. - 522 p.
- 3rd Edition.
Рассматривается версия MS Excel 2007.
Visual Basic for Applications (VBA for short) is a programming environment designed to work with Microsoft’s Office applications (Word, Excel, Access, and PowerPoint). Components in each application (for example, worksheets or documents) are exposed as objects to the programmer to use and manipulate to a desired end. Almost anything you can do through the normal use of the Office application can also be automated through programming.
VBA is a complete programming language, but you can’t use it outside the application in which it is integrated. This does not mean VBA can be integrated only with Office programs. Any software vendor that decides to implement VBA can include it with their application.
VBA is relatively easy to learn, but to use it in a new application, you must first become familiar with the object model of the application. For example, the Document and Dictionary objects are specific to the Word object model, whereas the Workbook, Worksheet, and Range objects are specific to the Excel object model.
As you proceed through this book, you will see that the Excel object model is fairly extensive; however, if you are familiar with Excel, you will find that using these objects is generally straightforward.
Visual Basic for Applications with Excel
Beginning programming with VBA
Procedures and conditions
Loops and arrays
Excel objects
VBA userforms and additional controls
Error handling, debugging, and basic file I/O
Using XML with Excel VBA projects
Excel charts
VBA shapes