add dao 3.6 ref

Corticus

Well-known Member
Joined
Apr 30, 2002
Messages
1,579
Hi,

Would someone please tell me how to add the DAO 3.6 reference using VBA?

Thanks!

-Corticus
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Application.References.AddFromGuid "{00025E01-0000-0000-C000-000000000046}", 5, 0

should do the trick :)
 
Upvote 0
yeah!

Thanks dk,

That's exactly what I wanted. Is there a place where I could find all the references listed with their description, so I don't have to keep asking everytime this comes up? :D
I've found a few sites that had some references listed, but nothing too extensive.

Thanks again!
-Corticus
 
Upvote 0
I use this procedure in Excel. It lists all references in the active workbook. I'm sure it wouldn't be too difficult to port it to Access, or to make something which gives the info about ALL registered components on your system.

Anyway, enjoy!

Code:
Sub ListRefs()
    Dim oReference As Object
    Dim lngRow As Long


    lngRow = 2

    'Put in headers
    Range("A1:F1").Value = Array("Name", "GUID", "Major", "Minor", "Description", "Full Path")
    Range("A1:F1").Font.Bold = True

    For Each oReference In ActiveWorkbook.VBProject.References
        Cells(lngRow, 1) = oReference.Name
        Cells(lngRow, 2) = oReference.GUID
        Cells(lngRow, 3) = oReference.Major
        Cells(lngRow, 4) = oReference.Minor
        Cells(lngRow, 5) = oReference.Description
        Cells(lngRow, 6) = oReference.FullPath
        lngRow = lngRow + 1
    Next oReference

    Cells.Columns.AutoFit


End Sub
 
Upvote 0
That's cool dk, thanks!

I'll post back when and if I can get it too work in Access. I'll definately get to use it in Excel as is.

-Corticus
 
Upvote 0

Forum statistics

Threads
1,221,501
Messages
6,160,177
Members
451,629
Latest member
MNexcelguy19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top