Reference Order

D

DS

Do these References need to be in any particular order, or will any order
do?

Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft Active X Data Object 2.1 Library
Microsoft DAO 3.6 Object Library
Microsoft HTML Object Library
Microsoft WinHttp Services, Version 5.1

Thanks
DS
 
B

Brendan Reynolds

DS said:
Do these References need to be in any particular order, or will any order
do?

Visual Basic for Applications
Microsoft Access 10.0 Object Library
OLE Automation
Microsoft Active X Data Object 2.1 Library
Microsoft DAO 3.6 Object Library
Microsoft HTML Object Library
Microsoft WinHttp Services, Version 5.1

If there are objects with the same name in more than one referenced object
library, then VBA will use the object library that appears first in the list
of references. The ADODB and DAO object libraries include objects with the
same names - Recordset for example. So if you have unqualified declarations
of these objects, such as "Dim rst As Recordset", VBA will create an ADO
recordset, because the ADODB object library is referenced before the DAO
object library. You can avoid this by qualifying the declarations to specify
the containing object library, like so: "Dim rst As ADODB.Recordset" or "Dim
rst As DAO.Recordset".
 
D

DS

Thank you, I will check my Declarations to make sure that they are specific.
Is the order that I have them in OK. Or is there a better order?
Thanks
DS
 
B

Brendan Reynolds

DS said:
Thank you, I will check my Declarations to make sure that they are
specific. Is the order that I have them in OK. Or is there a better
order?
Thanks
DS

Other than the issue that I mentioned, the order is, to the best of my
knowledge, irrelevant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top