Friday, January 28, 2005

Use Dynamic Control in MS Excel

Excel 2003 and Visual Studio Tools for Office, Version 2005 Solution: Using Dynamic Controls and Views Use the .NET Framework in Visual Studio 2005 Beta 1 to utilize managed controls that present and navigate data in ways that Excel does not support out-of-the-box.

A Fool-proof Way to Add a Library Reference in MS Access

From my MS Access Tips page at

Those of you who develop Access add-ins or library databases, know that adding a reference to the addin or library database to the user .mdb can be tricky, as the library file may not be where it is expected to be. I use the following function, which is called each time the library file is loaded and uses the Name property of the CodeDb function to return the full path of the library file:

Private Function aad_AddLibraryReference() As Boolean
On Error GoTo AddLibraryReferenceError

Dim aad_refBuilderLibrary As Reference

Set aad_BuilderLibrary = References.AddFromFile(CodeDb.Name)
aad_AddLibraryReference = True
Exit Function


If Err = 32813 Then 'Reference already exists
Resume Next
MsgBox "Add LibraryDB Reference Error" & Err & ". " & Err.Description
aad_AddLibraryReference = False
Exit Function
End If

End Function

No comments: