Absolute Beginner's Guide to VBA
Authors: McFedries P.
Published year: 2003
Pages: 9-12/146
Buy this book on amazon.com >>
     

What You Should Know Before Reading This Book

First and foremost, this book does not assume that you've programmed before. Absolute VBA beginners are welcome here and will find the text to their liking.

I've tried to keep the chapters focused on the topic at hand and unburdened with long-winded theoretical discussions. For the most part, each chapter gets right down to brass tacks without much fuss and bother. To keep the chapters uncluttered, I've made a few assumptions about what you know and don't know:

  • I assume you have knowledge of rudimentary computer concepts such as files and folders.

  • I assume you're familiar with Windows and that you know how to launch applications and work with tools such as menus , dialog boxes, and the Help system.

  • I assume you can operate peripherals attached to your computer, such as the keyboard, mouse, printer, and modem.

  • This book's examples use the Office 2003 applications, although they also work with Office 2000 and Office XP. Therefore, I assume you've used these Office programs for a while and are comfortable working with these programs.

     

This Book's Special Features

The Absolute Beginner's Guide to VBA is designed to give you the information you need without making you wade through ponderous explanations and interminable technical background. To make your life easier, this book includes various features and conventions that help you get the most out of the book and VBA itself.

Steps : Throughout this book, each VBA task is summarized in step-by-step procedures.

Things you type : Whenever I suggest that you type something, what you type appears in a bold font.

Visual Basic keywords : Keywords reserved in the Visual Basic for Applications language appear in monospace type.

Commands : I use the following style for application menu commands: File, Open . This means that you pull down the File menu and select the Open command.

The code continuation character ( graphics/ccc.gif ) : When a line of code is too long to fit on one line of this book, it is broken at a convenient place, and the code continuation character appears at the beginning of the next line.

This book also uses the following boxes to draw your attention to important (or merely interesting) information.

graphics/note_icon.gif

The Note box presents asides that give you more information about the topic under discussion. These tidbits provide extra insights that give you a better understanding of the task at hand. In many cases, they refer you to other sections of the book for more information.


tip

graphics/tip_icon.gif

The Tip box tells you about VBA methods that are easier, faster, or more efficient than the standard methods .


caution

graphics/caution_icon.gif

The Caution box tells you about potential accidents waiting to happen. There are always ways to mess things up when you're working with computers. These boxes help you avoid at least some of the pitfalls.


     

Part I: Getting Started with VBA

 

Recording Your First Macro

 

Writing Your Own Macros

 

Understanding Program Variables

 

Building VBA Expressions

 

Working with Objects

 

Controlling Your VBA Code

     

Chapter 1. Recording Your First Macro

In this chapter

  • Understanding what macros are all about

  • Appreciating the advantages of macros

  • Learning about VBA procedures

  • Recording your first macro

  • Viewing and editing your recorded macro

This chapter gets your VBA education off to a rousing start by introducing you to some macro basics. You'll begin, appropriately enough, at the beginning by learning just what macros are, what you can do with them, and why you should learn any of this stuff. You'll then get a brief introduction to VBA procedures, but that will be the end of the theoretical portion of the show. You'll also get down to brass tacks by learning to compose macros the easy way: by recording them automatically. From there, you'll learn how to view the resulting macro and how to edit it using the Visual Basic Editor. This will set the stage for the next few chapters where you take a closer look at the specifics of the VBA language.

Absolute Beginner's Guide to VBA
Authors: McFedries P.
Published year: 2003
Pages: 9-12/146
Buy this book on amazon.com >>

Similar books on Amazon