0.1Introduction

This book teaches you, from the ground up, what you need to know to become a competent Excel VBA programmer. Unlike many texts on programming, this book does not assume that you have prior programming knowledge.

In the early chapters of this book you will learn the most fundamental Visual Basic for Applications (VBA) skills. Chapter by chapter you will build on those skills. By the end of this book you will have learned not only how to significantly automate your own work in Excel, but how to design and program complete applications for others to use.

In Section One, you learn:

Fundamental skills related to recording and modifying VBA code created with the Excel Macro Recorder.

How to extend Excel's worksheet functions by writing your own functions for use in worksheet cells.

How to write VBA code that makes decisions and repeats actions as needed.

Use the VBA Debugger to solve problems in your VBA code.

Automate the creation and formatting of Charts.

Automate the creation of Pivot Tables and Pivot Charts.

How to create file dialogs to easily select files such as workbooks or templates, for saving or opening.

In Section Two, you learn more advanced topics for developing applications based in Excel:

How to apply defensive programming to your projects.

How to write VBA code that handles errors gracefully, so that your application does not crash.

How to design large-scale applications using modular programming techniques.