O'Reilly logo

F. Scott Barker's Microsoft® Access 2000 Power Programming by F. Scott Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

USING AUTOMATION

Before using Automation, you need to set up references to the various applications' object libraries, also known as TypeLibs. By setting up references, you can strongly type variables (so that you can use data types such as Sheet and Chart instead of Object), get early binding, and use constants defined in the TypeLib. (Declaring Automation variables is described in more detail in the next section, “Declaring Object Variables in VBA.”)

Suppose that you want to set a reference to the Microsoft Word 9.0 TypeLib. In the database where you want to set up a reference, open the module editor with any module, and then follow these steps:

1.
In the VBE, open the Tools menu and choose References.
2.
Select Microsoft Word 9.0 Object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required