11.1. Using Dynamic Link Libraries (DLLs)
Dynamic Link Libraries (DLLs) are simply compiled code libraries. You already used a DLL when adding a reference to the ADO library (Chapter 5) so that you could work with the ADO object model and the properties, methods, and events for the objects it contains. In this section, you will look at another example of how to use a standard DLL by just adding a reference in your project. You will also look at how to manually declare an external DLL and use it within your code.
11.1.1. Standard DLLs
You can reference libraries such as DLLs by selecting Tools References from the Visual Basic Editor and then selecting the particular library that you want to work with. After a reference has been added, you can then manipulate the functionality contained in the library from within your VBA code.
Try It Out: Using the Microsoft Office Object Library to Create a Custom Command BarLet's look at an example of creating custom command bars for your application using the Microsoft Office 12.0 Object Library. The CommandBars property of the Application object allows you to access the CommandBars collection. The CommandBars collection enables you to manage and create toolbars, menu bars, and shortcut menus.
|
Get Beginning Access™ 2007 VBA now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.