Microsoft Data Access Components (MDAC) 2.8 SP1 contains core Data Access components such as the Microsoft SQL Server™ OLE DB provider and ODBC driver. This redistributable installer for the MDAC 2.8 SP1 release installs the same Data Access components as Microsoft Windows XP SP2.
- Microsoft Activex Data Objects Recordset 2.8 Library Download
- Microsoft Activex Data Objects 6.1 Library Download Windows Xp
I always added references into my .bas module through 'Tools...->References...'. And now I want to add references automatically, using macro code. I need to add the two references: Microsoft ActiveX Data Objects 6.1 Library
and Microsoft VBScript Regular Expressions 5.5
. And I found a piece of code that seems to do what I want:
But I don't know how to get paths of files (PATH_TO_FILE
). Maybe somebody can help me? Thanks in advance.
1 Answer
You can find the file path on the References VBAProject dialog (Tools >> References). Look for the location property.
EDIT: As pointed out in the comments, you cannot always read the full name. This sub outputs all the current references.
Warning
You should really read @MacroMan's comment on the OP. Although you can update references programmatically, you probably shouldn't.
destination-datadestination-data