View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Michel Pierron Michel Pierron is offline
external usenet poster
 
Posts: 214
Default How to know the excel's constant

You can try:
' From the Project menu, select References, and set a reference to
tlbinf32.dll
Sub OfficeConstantsList()
Const OfficeApp As String = "C:\Program Files\Microsoft
Office\Office10\excel.exe"
Dim x As TypeLibInfo, r, mbr, i As Long
On Error Resume Next
Cells.ClearContents
Set x = TypeLibInfoFromFile(OfficeApp)
For Each r In x.Constants
For Each mbr In r.Members
i = i + 1
Cells(i, 1) = mbr.Name
Cells(i, 2) = mbr.Value
Next mbr
Next r
Set x = Nothing
Columns("A:A").Columns.AutoFit
End Sub

MP

"Hidayat" a écrit dans le message de
...
Hi Expert,
Does anyone know the value of the Excel constants such as
xlDiagonal, xlEdgeBottom etc. How to get that's value..?
please advice
Thanks for advices
Hidayat