Newly updated for Excel 2002, Writing Excel Macros with VBA, 2nd Edition provides Excel power-users, as well as programmers who are unfamiliar with the Excel object model, with a solid introduction to writing Visual Basic for Applications (VBA) macros and programs for Excel. In particular, the book focuses on:
-
The Visual Basic Editor and the Excel VBA programming environment. Excel features a complete, state-of-the-art integrated development environment for writing, running, testing, and debugging VBA macros.
The VBA programming language, the same programming language used by the other applications in Microsoft Office XP and 2000, as well as by the retail editions of Visual Basic 6.0. The Excel object model, including new objects and new members of existing objects in Excel 2002. Excel exposes nearly all of its functionality through its object model, which is the means by which Excel can be controlled programmatically using VBA. While the Excel object model, with 192 objects, is the second largest among the Office applications, you need to be familiar with only a handful of objects to write effective macros. Writing Excel Macros focuses on these essential objects, but includes a discussion of many more objects as well. Writing Excel Macros with VBA, 2nd Edition is written in a terse, no-nonsense manner that is characteristic of Steven Roman's straightforward, practical approach. Instead of a slow-paced tutorial with a lot of handholding, Roman offers the essential information about Excel VBA that you must master to write macros effectively. This tutorial is reinforced by interesting and useful examples that solve common problems you're sure to have encountered. Writing Excel Macros with VBA, 2nd Edition is the book you need to delve into the basics of Excel VBA programming, enabling you to increase your power and productivity.
This book provides an introduction to programming the Excel object model using Visual Basic for Applications (VBA). However, it is not intended to be an encyclopedia of Excel programming. The goal here is to acquaint you with the main points of Excel programming—enough so that you can continue your education (as we all do) on your own. The goal is that after reading this book you should not need to rely on any source other than the Excel VBA Help file or a good Excel VBA reference book and a nice object browser (such as my Enhanced Object Browser, a coupon for which is included in the back of this book).
t has been my experience that introductory programming books (and, sadly, most trade computer books) tend to do a great deal of handholding. They cover concepts at a very slow pace by padding them heavily with overblown examples and irrelevant anecdotes that only the author could conceivably find amusing, making it difficult to ferret out the facts. Frankly, I find such unprofessionalism incredibly infuriating. In my opinion, it does the reader a great disservice to take perhaps 400 pages of information and pad it with another 600 pages of junk.
There is no doubt in my mind that we need more professionalism from our authors, but it is not easy to find writers who have both the knowledge to write about a subject and the training (or talent) to do so in a pedagogical manner. (I should hasten to add that there are a number of excellent authors in this area—it's just that there are not nearly enough of them.) Moreover, publishers tend to encourage the creation of 1000-plus page tomes because of the general feeling among the publishers that a book must be physically wide enough to stand out on the bookshelf! I shudder to think that this might, in fact, be true. (I am happy to say that O'Reilly has not succumbed to this opinion.)