DAO and VBA

In Chapter 25, you learned about Automation. A VBA Automation controller (such as Microsoft Excel or Microsoft Visual Basic) can load any Automation component and then use it to create objects. Once the objects are created, the component can get and set properties and can call methods. The components you created in Chapter 25 all communicated through the COM IDispatch interface. But VBA can use interfaces other than IDispatch to communicate with a component.

If you look in the Windows Registry under HKEY_CLASSES_ROOT-\TypeLib, you'll find the class ID {00025E01-0000-0000-C000-000000000046} and the pathname for DAO350.DLL, which contains the DAO type library. If you select this item as a VBA reference (by pressing Alt-F11 in Excel and then choosing Object Browser from the Visual Basic View menu, for example), your VBA programs can use the DAO objects and you can browse the DAO library, as shown here.

click to view at full size.

Like IDispatch servers, the Microsoft DAO component implements objects that have properties and methods.



Programming Visual C++
Advanced 3ds max 5 Modeling & Animating
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 331
Authors: Boris Kulagin

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