Need list of VBA / Access / ADODB / DAO Classes Members

  • Thread starter Thread starter Tom Roberts
  • Start date Start date
T

Tom Roberts

Hi,
I don't know if anyone out there can help, but if so thank you!

Having had a nose around the Object Browser, it would be very handy for
me if I could get a list (or generate this using code?) of all of the
libraries, classes and members of classes.

This is to help with disambiguation.

I have a short list already, (cut paste x 400) but wondered if there
was something more complete out there.

Any pointers gratefully received.

Tom Roberts

cross posted to
microsoft.public.access
microsoft.public.access.modulesdaovba
 
In the Contents of the general Access Help, there are a number of "books"
near the bottom that has lots of these details.

In particular, you may want to look at the following "books": Programming
Information, Visual Basic Language Reference, Microsoft Access Visual Basic
Reference, Microsoft Office Visual Basic Reference, Microsoft Data Access
Objects 3.6 (DAO), Microsoft ActiveX Data Objects (ADO).
 
Thanks for that. However I really would prefer (if its out there) a list
that I can then search through and bring into my code.

Otherwise its back to cut and paste *sigh*
 
just an idea. i think you can generate this list using TLBINF32.DLL. this
dll as i know shipped with VB5/vb6
 
Thanks Alex. That followed by a quick search on the web, got me in the
right direction.

Tom
 
Well, thought I would post this in case anyone else has this query:
You need to ensure that you have a reference to TLBINF32.DLL for this to
work
Basically a reworking of
http://support.microsoft.com/default.aspx?scid=kb;en-us;172988
for VBA in Access 2000
:)

'This sub will search through the menu and list all queries and functions
that are not used
'in these...
'Current references are
' Visual Basic for Applications Library
' Access C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6.DLL
' Microsoft Access 9.0 Object Library
' VBA C:\Program Files\Microsoft Office\Office\MSACC9.OLB
' Microsoft DAO 3.6 Object Library Old style when converted
from A97
' DAO C:\Program Files\Common Files\Microsoft
Shared\DAO\DAO360.DLL
' Microsoft Excel 9.0 Object Library Used for contracting reports
' Excel C:\Program Files\Microsoft Office\Office\EXCEL9.OLB
' Microsoft Office 9.0 Object Library Used for toolbars
' Office C:\Program Files\Microsoft Office\Office\MSO9.OLB
' Microsoft Word 9.0 Object Library Used for Pass letters
' Word C:\Program Files\Microsoft Office\Office\MSWORD9.OLB
' Microsoft Windows Common Controls 5.0 (SP2)
' ComctlLib C:\Windows\System\COMCTL32.OCX
' Microsoft ActiveX Data Objects 2.1 Library Used for Pass letters
' ADODB C:\Program Files\Common Files\System\ado\MSADO21.TLB
' OLE Automation
' stdole C:\WINDOWS\system32\STDOLE2.TLB
' TypeLib Information
' TLI C:\WINDOWS\system32\TLBINF32.DLL
'---------------------------------------------------------------------------
---------------------------
' Not used but useful later
' Microsoft ADO Ext 2.8 for DDL and Security Library Reference
' ADOX C:\Program Files\Common Files\System\ado\MSADOX.DLL
' Microsoft Jet and Replication Objects 2.6 Library Reference
' JRO C:\Program Files\Common Files\System\ado\MSJRO.DLL
'





'Get all the libraries, classes and members
'This uses tlbinf32.dll, an unsupported dll

Sub GetLibrariesAndClasses()
Dim tliX As TLI.TypeLibInfo
Dim cocY As TLI.CoClasses
Dim intfZ As TLI.Interfaces
Dim memW As TLI.Members
Dim memiU As TLI.MemberInfo
Dim intI As Integer
Dim intJ As Integer
Dim intK As Integer
Dim strFileName As String
Dim strName As String
Dim strMembers As String

On Error Resume Next
strFileName = "C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6.DLL"
'strFileName = "C:\Program Files\Microsoft Office\Office\MSWORD9.OLB"
'strFileName = "MSWORD9.OLB"

Set tliX = TypeLibInfoFromFile(strFileName)
Set cocY = tliX.CoClasses
Stop
For intI = 1 To cocY.COUNT
If intI <> 1 Then
strName = ""
Debug.Print strName
'List1.AddItem strName
End If

strName = "Class Name: " & cocY.Item(intI).Name
Debug.Print strName
'List1.additem strName

Set intfZ = cocY.Item(intI).Interfaces

For intJ = 1 To intfZ.COUNT

Set memW = intfZ.Item(intJ).Members

For intK = 1 To memW.COUNT
Set memiU = memW.Item(intK)
strMembers = "Member: " & memiU.Name
Debug.Print strMembers
'List1.AddItem strMembers
Next intK
Next intJ
Next intI

Set intfZ = Nothing
Set cocY = Nothing
Set tliX = Nothing
Set memW = Nothing
End Sub
 
Posting the solution in case anyone else needs it. A reworking of
http://support.microsoft.com/default.aspx?scid=kb;en-us;172988
for Access 2000

:)

'This sub will search through the menu and list all queries and
functions that are not used
'in these...
'Current references are
' Visual Basic for Applications Library
' Access C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6.DLL
' Microsoft Access 9.0 Object Library
' VBA C:\Program Files\Microsoft Office\Office\MSACC9.OLB
' Microsoft DAO 3.6 Object Library Old style when converted
from A97
' DAO C:\Program Files\Common Files\Microsoft
Shared\DAO\DAO360.DLL
' Microsoft Excel 9.0 Object Library Used for contracting reports
' Excel C:\Program Files\Microsoft Office\Office\EXCEL9.OLB
' Microsoft Office 9.0 Object Library Used for toolbars
' Office C:\Program Files\Microsoft Office\Office\MSO9.OLB
' Microsoft Word 9.0 Object Library Used for Pass letters
' Word C:\Program Files\Microsoft Office\Office\MSWORD9.OLB
' Microsoft Windows Common Controls 5.0 (SP2)
' ComctlLib C:\Windows\System\COMCTL32.OCX
' Microsoft ActiveX Data Objects 2.1 Library Used for Pass letters
' ADODB C:\Program Files\Common Files\System\ado\MSADO21.TLB
' OLE Automation
' stdole C:\WINDOWS\system32\STDOLE2.TLB
' TypeLib Information
' TLI C:\WINDOWS\system32\TLBINF32.DLL
'------------------------------------------------------------------------------------------------------
' Not used but useful later
' Microsoft ADO Ext 2.8 for DDL and Security Library Reference
' ADOX C:\Program Files\Common Files\System\ado\MSADOX.DLL
' Microsoft Jet and Replication Objects 2.6 Library Reference
' JRO C:\Program Files\Common Files\System\ado\MSJRO.DLL
'





'Get all the libraries, classes and members
'This uses tlbinf32.dll, an unsupported dll

Sub GetLibrariesAndClasses()
Dim tliX As TLI.TypeLibInfo
Dim cocY As TLI.CoClasses
Dim intfZ As TLI.Interfaces
Dim memW As TLI.Members
Dim memiU As TLI.MemberInfo
Dim intI As Integer
Dim intJ As Integer
Dim intK As Integer
Dim strFileName As String
Dim strName As String
Dim strMembers As String

On Error Resume Next
strFileName = "C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6.DLL"
'strFileName = "C:\Program Files\Microsoft Office\Office\MSWORD9.OLB"
'strFileName = "MSWORD9.OLB"

Set tliX = TypeLibInfoFromFile(strFileName)
Set cocY = tliX.CoClasses
Stop
For intI = 1 To cocY.COUNT
If intI <> 1 Then
strName = ""
Debug.Print strName
'List1.AddItem strName
End If

strName = "Class Name: " & cocY.Item(intI).Name
Debug.Print strName
'List1.additem strName

Set intfZ = cocY.Item(intI).Interfaces

For intJ = 1 To intfZ.COUNT

Set memW = intfZ.Item(intJ).Members

For intK = 1 To memW.COUNT
Set memiU = memW.Item(intK)
strMembers = "Member: " & memiU.Name
Debug.Print strMembers
'List1.AddItem strMembers
Next intK
Next intJ
Next intI

Set intfZ = Nothing
Set cocY = Nothing
Set tliX = Nothing
Set memW = Nothing
End Sub
 
Back
Top