Now we come to a feature that for some people will be reason enough to get MOD: the Code Librarian. One of the best ways to learn to program is to read others' code. The problem comes in finding the right code snippet you need at the time. Digging through online help can be tedious, and the Knowledge Base doesn't always have what you need. The Code Librarian is a combination of an Access database and a custom front end, accessible from within the VBA editing environment. Simply choose Code Librarian from the Add-Ins menu, and pretty soon you'll be browsing code samples to your heart's content. Suppose, for example, that you've decided it's time to take off the training wheels (the ADO Data Control) and begin doing data access through ADO code. You fire up the Code Librarian, open the "booklet" marked ADO, and you see a screen like the one that appears in Figure C. Inside the ADO section are subsections: ADO Samples, ADO Samples With Oracle, and Jet Provider. When you click on the first subsection, the right-hand pane will fill with a list box of the individual samples (actually, records in the database). When you choose, say, Using The ODBC OLE-DB Provider in the record pane (as I've done above), the lower right-hand pane -- the Description pane -- will show a text description of the code snippet. If you then double-click the snippet name, you'll see the actual code in a new tabbed window (Figure D).
| Figure D |
![]() |
- Use the mouse to select part or all of it and then copy it to the Clipboard.
- Click the Insert Code To Module button to insert the code snippet into the currently active module in the Visual Basic Editor.
- Click the Copy To Clipboard button to perform a copy-and-paste action.
If you've installed MOD but don't see any of the tools under the Add-Ins menu, you may have to load them. Perform the following steps to make sure you have all the tools:
- Choose Tools | Add-In Manager (Figure E).
- Click on the tool you want to use and select the Loaded/Unloaded option. (Or simply double-click the tool name.) This should change the status of the tool to Loaded.
- If you want the tool to always be available, select Load On Startup.
| Figure E |
![]() |
Tech Update forum. Find out what's where in the new Tech Update with our
Guided Tour. Let the editors know what you think in the
Mailroom.






