VBA Programming for the Absolute Beginner is designed to help readers with no programming experience learn not only the basics of VBA, but also the fundamental programming concepts they need to grasp in order to learn their next programming language. Offering an easy, non-intimidating approach to VBA, the For the Absolute Beginner series was designed by computer science instructors and takes a unique approach to programming. Throughout the book, you will be using programming concepts to create simple games with VBA. Before you know it, you will have accumulated a wealth of programming skills that you can easily put to use in real-world scenarios.
Visual Basic for Applications (VBA for short) is a programming environment designed to work with Microsoft’s Office applications (Excel, Word, Access, etc.). Components in each application (for example, worksheets or documents) are exposed as objects and made available to the programmer to use and manipulate to a desired end. Anything you can do through normal use of the Office applications can also be automated through programming.
You can also extend the abilities of the application through the use of additional reusable objects provided for the programmer. These reusable objects are referred to as ActiveX controls, and I will demonstrate their use throughout this book. ActiveX controls are pre-built, reusable programming components that you can add to your own programming projects. Common examples include text boxes, buttons, labels, and image controls. They are very useful to program developers because they are reusable and serve to handle common programming tasks. Because ActiveX controls are reusable they only have to be developed once, thus saving valuable time. VBA includes several common ActiveX controls for use in Office projects. You can also import ActiveX controls from third party vendors, though licensing and copyrights may restrict their use in your VBA project.
The goal of this book is to help you learn VBA programming with Excel. No prior programming experience is required or expected. Although you do not have to be an Excel user, you should have a good understanding of the basic tools involved in using any spreadsheet application. This includes a basic understanding of ranges and cell references, formulas, built-in functions, and charts. If you’re not comfortable with spreadsheet applications or it’s been a while since you have used a spreadsheet, then I recommend you consider purchasing another introductory book on how to use the Excel application (Microsoft Excel Fast & Easy, by Faith Wempen, is a good choice). In addition to spreadsheets, I also expect you to have a basic understanding of the Windows operating system.
About the Author
Duane Birnbaum began programming in graduate school, where he wrote custom software for interfacing the various electronic devices required for his experiments and analyzing the data obtained from them. Since completing his Ph.D. in physical chemistry, he has been working as a post-doctoral and research scientist in academia and industry while continuing to teach on a part-time basis. For the last five years he has been working as a research scientist in the biotechnology industry and serving as a parttime lecturer in the Computer Science department of Indiana University/Purdue University. He teaches introductory classes in data analysis, database design, and Visual Basic.