To register the dll, in the command prompt or Start/Run
regsvr32 c:\windows\system32\tlbinf32.dll
adjust path to suit
I also forgot if you are using xl97/2000 the typelib is in the *.olb
Following should cater for all versions -
Sub dumpConstants()
''' with a ref to TypLib Information
'Dim oTLI As TLI.TLIApplication
'Dim oInfo As TLI.TypeLibInfo
'Dim oConst As TLI.ConstantInfo
'Dim oMembers As TLI.Members
''' without the reference use As Object
Dim oTLI As Object
Dim oInfo As Object
Dim oConst As Object
Dim oMembers As Object
Dim i As Long, c As Long
Dim ver As Long, sFile As String
Set oTLI = CreateObject("TLI.TLIApplication")
ver = Left$(Application.Version, 2)
Select Case ver
Case 8: sFile = "excel8.olb"
Case 9: sFile = "excel9.olb"
Case Else: sFile = "excel.exe"
End Select
Set oInfo = oTLI.TypeLibInfoFromFile(Application.Path & "\" & sFile)
For Each oConst In oInfo.Constants
i = i + 1
Cells(i, 1) = oConst.Name
Set oMembers = oConst.Members
For c = 1 To oMembers.Count
i = i + 1
Cells(i, 2) = oMembers(c).Name
Cells(i, 3) = oMembers(c).Value
Next
Next
Columns("A:C").EntireColumn.AutoFit
End Sub
Note there are new named constants with successive version.
Regards,
Peter T