473,320 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

References in vba

Hello everybody:

I'd like to know what references in my vba code are used or not.

I work in a code made by another person previously, i founded to many
references and i believe that someones are not used.

I'd like to optimize the application ereasing the useless references.

Thanks a lot.
Jan 15 '08 #1
3 3831
On 15 jan, 16:27, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:
CenturionX <darwinbaldr...@gmail.comwrote:
I'd like to know what references in my vba code are used or not.
I work in a code made by another person previously, i founded to many
references and i believe that someones are not used.
I'd like to optimize the application ereasing the useless references.

What version of Access? * Are you using ADO or DAO or both?

Do you have any references besides the basic three? *Are you sure you need them?
Write down the path and name of the extra ones (or put the following code in a module
and execute the code), delete from the references list and Compile and Save All.
Keep any necessary references and ensure they are distributed to the target system.

Dim ref As Reference

* * For Each ref In Access.References
* * * * Debug.Print ref.Name & " " & ref.FullPath & " " & ref.Major & "." & ref.Minor
* * Next ref

For a very detailed page on reference problems seehttp://www.accessmvp.com/djsteele/AccessReferenceErrors.html

Ctrl+G will take you into the Debug/Immediate window. *Then click on
Tools on the menu bar and References.

The Access 97 default references are:
Visual Basic for Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 3.5x Object Library

The Access 2000 default references are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
* or
Microsoft DAO 3.6 Object Library

The Access 2002 default references when the MDB is created in Access
2000 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library

The Access 2002 default references when the MDB is created in Access
2002 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.5 Library.

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library

The Access 2003 default references when the MDB is in A2002/A2003 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.5 Library

Tony
--
Tony Toews, Microsoft Access MVP
* *Please respond only in the newsgroups so that others can
read the entire thread of messages.
* *Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab.ca/accsmstr.htm
* *Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
THANKS Very usefull
Jan 15 '08 #2
CenturionX <da************@gmail.comwrote:
>I'd like to know what references in my vba code are used or not.

I work in a code made by another person previously, i founded to many
references and i believe that someones are not used.

I'd like to optimize the application ereasing the useless references.
What version of Access? Are you using ADO or DAO or both?

Do you have any references besides the basic three? Are you sure you need them?
Write down the path and name of the extra ones (or put the following code in a module
and execute the code), delete from the references list and Compile and Save All.
Keep any necessary references and ensure they are distributed to the target system.

Dim ref As Reference

For Each ref In Access.References
Debug.Print ref.Name & " " & ref.FullPath & " " & ref.Major & "." & ref.Minor
Next ref

For a very detailed page on reference problems see
http://www.accessmvp.com/djsteele/Ac...nceErrors.html

Ctrl+G will take you into the Debug/Immediate window. Then click on
Tools on the menu bar and References.

The Access 97 default references are:
Visual Basic for Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 3.5x Object Library

The Access 2000 default references are:
Visual Basic for Applications
Microsoft Access 9.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
or
Microsoft DAO 3.6 Object Library

The Access 2002 default references when the MDB is created in Access
2000 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library

The Access 2002 default references when the MDB is created in Access
2002 format are:
Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.5 Library.

The Access 2003 default references when the MDB is in A2000 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.1 Library

The Access 2003 default references when the MDB is in A2002/A2003 format are
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects 2.5 Library

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Jan 15 '08 #3
CenturionX <da************@gmail.comwrote in news:affc6981-42f8-4d51-
bd***************@i12g2000prf.googlegroups.com:
Hello everybody:

I'd like to know what references in my vba code are used or not.

I work in a code made by another person previously, i founded to many
references and i believe that someones are not used.

I'd like to optimize the application ereasing the useless references.

Thanks a lot.
Remove one. Click Compile. (It's under the debug heading). Problem? Reset
the reference.

Remove another one. Click Compile. No problem? Keep on truckin'.
Jan 16 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Tom | last post by:
The motivation for references seems clear: stop people from using nasty pointers when all they really want is a reference to an object. But C++ references are so inadequate that I'm still using...
22
by: xmp333 | last post by:
Hi All, I am trying to hide my JavaScript source. The method I chose was to keep all the important source in a password protected folder, and then use a SRC="folder/script.js" to include it...
33
by: JKop | last post by:
I understand variables/objects and pointer variables perfectly: int X = 5; int* pX = &X; *pX = 4; int** ppX = &pX:
2
by: S. van Beek | last post by:
Dear reader, For removing a reference in the VBA reference form I receive from Doug Steele the following code: ........... References.Remove refCurr
11
by: codebloatation | last post by:
I know how to use references but i DO not get WHY they exist other than to add to the language. Are they actually needed for anything?
14
by: el_sid | last post by:
Our developers have experienced a problem with updating Web References in Visual Studio.NET 2003. Normally, when a web service class (.asmx) is created, updating the Web Reference will...
30
by: jeremygetsmail | last post by:
I've got an adp (Metrix.adp) with a reference to another adp (InteractSQL.adp). InteractSQL sits on a server, and is refered to by all of the clients (Metrix), which sit on the client machines...
3
by: DonJefe | last post by:
Does anyone have experience using project->project references in large solutions? What are the plus/minuses that you have found? Currently, we are using the binary assembly references for our...
9
by: igor.kulkin | last post by:
References is a relatively basic feature of C++ language. It might be a good thing to think of references as aliases to the variables. However it's good to think of references this way when you...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.