Object References

team lib

Before you can use an Automation Object you need to create a reference to the appropriate object library. An object library is usually a DLL or OCX file that contains the code for the object. You can see which objects are installed on your machine by switching to the VBA IDE and selecting References from the Tools menu:

click to expand

In the example above, the database has nine references set - these are the ones with check marks against them. You can easily set a reference by just checking an item, and unchecking an item removes the reference - it doesn't remove the object library, just the reference. You saw in the previous chapter that you can use the Browse button to browse for other objects that are not already registered - such as an Access Add-In.

Important 

To complete the exercises in this chapter you should ensure that you at least have the references for Outlook, Word, Graph, and Office set, just like the picture above. You can scroll down through the list to find the libraries that you need.

 
team lib


Beginning Access 2002 VBA
Beginning Access 2002 VBA (Programmer to Programmer)
ISBN: 0764544020
EAN: 2147483647
Year: 2003
Pages: 256

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net