Chapter 4. Creating Code from Scratch in the Visual Basic Editor

In this chapter, you'll practice creating procedures from scratch in the Visual Basic Editor. The examples walk you through creating a procedure in Word, Excel, and PowerPoint.

For the examples in this book, the Visual Basic Editor should be set up a certain way, and (for good practice) set to require explicit declarations of variables. So we'll start off this chapter by ensuring that these conditions are met.

The purpose of this chapter is to give you a feel for creating code in the Visual Basic Editor before you study the details of the language. You'll work quickly with VBA elements (such as objects, properties, methods, variables, and constants) that you'll learn about more fully ...

Get Mastering VBA for Microsoft® Office 2010 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.