Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Introduction This book shows you what's doable with Microsoft Excel 2007 beyond the standard user interface. If you ever wanted to open a new worksheet without using built-in commands or create a custom, fully automated form to gather data and store the results in a spreadsheet, you've picked up the right book. This book shows you how to delegate many time-consuming and repetitive tasks to Excel by using its built-in language, VBA (Visual Basic for Applica- tions). By using special commands and statements and a number of Excel's built-in programming tools, you can work smarter than you ever thought possible. When I first started programming in Excel (circa 1990), I was working in a sales department and it was my job to calculate sales commissions and send the monthly and quarterly statements to our sales representatives spread all over the U.S. As this was a very time-consuming and repetitive task, I became immensely interested in automating the whole process. In those days it wasn't easy to get started in programming on your own. There weren't as many books written on the subject, so all I had was the built-in documentation that was difficult to understand. Nevertheless, I succeeded; my first macro worked like magic. It automatically calculated our sales folks' commissions and printed out nicely formatted statements. And while the computer was busy performing the same tasks over and over again, I was free to deal with other more interesting projects. Many years have passed since that day and Excel is still working like magic for me and a great number of other people who took time to familiarize themselves with its program- ming interface. If you'd like to join these people and have Excel do magical things for you as well, this book provides an easy, step-by-step introduction to VBA and other hot technologies that work nicely with Microsoft Excel. One is ASP (short for Active Server Pages) and the other is XML (or Extensible Markup Language). Besides this book, there is no other cost; all the tools you need are built in to Excel. If you have not yet discovered them, Excel 2007 VBA Programming with XML and ASP will lead you through the process of creat- ing your first macros, VBA procedures, VBScripts, ASP pages, and XML documents, from start to finish. Along the way, there are detailed, practical "how-to" examples and plenty of illustrations. The book's approach is to xvii