Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you written this code? Have you distributed it? How are you writing
the code? What actual problem are you encountering, rather than what problems you think you may encounter. I'm happy to help, but what is the actual problem? References are saved in addins... -- www.alignment-systems.com "shivboy" wrote: Hi John, The reason I raised this question was because I am making a macro in Excel VBA which creates tables in Access, then provides user form to enter data into the tables and finally retrieve data from the tables to generate reports. Now, to do all this, I have had to use various library references while making the code work. Since I had to manually go to Tools References to import the libraries, I am sure that the same issue would lie with every user who would run the macro on his/her PC. In that case, I cannot expect the user to first import all the files manually and then start using the macro. It is for that purpose that I wanted to inherit / import the required libraries into the code so that wherever the code is run it works fine. I am sure there must be a way to import these libraries so as to ensure that the macro works fine everytime it is run. Peace, Shivboy John.Greenan Wrote: if you set a workbook reference then this should remain in you addin after you distribute it. What is the problem you are encountering - that the user does not have the dlls on his/her PC? There's no way to statically link in excel vba. You can try and use Microsoft Visual Basic for Applications Extensibility 5.3 - typically installed in "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB" and then use Dim oReference As VBIDE.Reference and ThisWorkbook.VBProject.References.AddFromFile or ThisWorkbook.VBProject.References.AddFromGuid to add the references at run time. It's quite tricky, as you will have to identify the GUID or file names and then work out how to handle the missing reference. -- www.alignment-systems.com "shivboy" wrote: I am working on a project which uses the following object libraries: Microsoft DAO 3.6 Object Library Microsoft ADO Ext. 2.8 for DDL and Security Microsoft Access 10.0 Object Library Microsoft ActiveX Data Objects 2.0 Library How can I explicitly inherit these libraries in my macro code so that no error is thrown due to non-inheritance of the libraries in user's machine. Furthermore, is there a location where I can find the complete reference list of these libraries? Please help. Peace, Shivboy -- shivboy ------------------------------------------------------------------------ shivboy's Profile: http://www.excelforum.com/member.php...o&userid=35137 View this thread: http://www.excelforum.com/showthread...hreadid=551762 -- shivboy ------------------------------------------------------------------------ shivboy's Profile: http://www.excelforum.com/member.php...o&userid=35137 View this thread: http://www.excelforum.com/showthread...hreadid=551762 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code libraries what format stored in? just out of interest | Excel Discussion (Misc queries) | |||
Importing libraries | Excel Discussion (Misc queries) | |||
How to explicitly set the regional code of an individual spreadsheet | Excel Discussion (Misc queries) | |||
Referencing Libraries through code. | Excel Programming | |||
Code libraries usable in all of Office? | Excel Programming |