ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to know the excel's constant (https://www.excelbanter.com/excel-programming/286688-how-know-excels-constant.html)

Hidayat

How to know the excel's constant
 
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

David Coleman

How to know the excel's constant
 
Hi Hidayat

Or you could do a keyword search in the help for constants or write

msgbox(constant_name) in a macro = this shows xlDialogZoom as 256....


Regards

David


"Hidayat" wrote in message
...
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




Andy Pope

How to know the excel's constant
 
Hi Hidayat,

Try the Object Browser within the VBE.

From Excel use ALT+F11 to display the VBE (visual basic editor)
The F2 to display the object browser.

You can then use the search function within the Object Browser.

Hidayat wrote:
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


--

Cheers
Andy

http://www.andypope.info


Bob Phillips[_6_]

How to know the excel's constant
 
Hidayat,

I have a little utility that will print out the constants and their values
on a separate worksheet, which you sort, print etc.

It caters for Outlook, Word, Excel, PowerPoint, Access 2000 and 2002. All
you need to do is plug in the Office directory (probably c:\Program
Files\Microsoft Office\Office) and you are away.

Mail me direct if you want a copy.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Hidayat" wrote in message
...
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




Michel Pierron

How to know the excel's constant
 
Hi "Hidayat";
http://download.microsoft.com/downlo...-US/wc0993.exe
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




Michel Pierron

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




Greg Rivet

How to know the excel's constant
 
Can't find the tlbinf32.dll. Help

Greg
"Michel Pierron" wrote in message
...
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






Michel Pierron

How to know the excel's constant
 
Hi Greg;
In the references list, if you see TypeLib Information, it is the same
thing.
MP

"Greg Rivet" a écrit dans le message de
...
Can't find the tlbinf32.dll. Help

Greg
"Michel Pierron" wrote in message
...
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








Michel Pierron

How to know the excel's constant
 
Hi Greg; test with this procedure, no reference is necessary:
Sub OfficeConstantsList()
Application.ScreenUpdating = False
Dim R, Member, i As Long, oPath As String
oPath = Application.Path & "\excel.exe"
With CreateObject("TLI.typelibinfo")
.ContainingFile = oPath
Workbooks.Add
For Each R In .Constants
i = i + 1
Cells(i, 1) = R.Name: Cells(i, 1).Font.Bold = True
Cells(i, 2) = "Value": Cells(i, 2).Font.Bold = True
Cells(i, 2).HorizontalAlignment = xlRight
For Each Member In R.Members
i = i + 1
Cells(i, 1) = Member.Name
Cells(i, 2) = Member.Value
Next Member
Next R
End With
Columns("A:B").Columns.AutoFit
Range("A2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
End Sub

MP

"Greg Rivet" a écrit dans le message de
...
Can't find the tlbinf32.dll. Help

Greg
"Michel Pierron" wrote in message
...
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








Greg Rivet

How to know the excel's constant
 
Michael, thank you very much.

Greg
"Michel Pierron" wrote in message
...
Hi Greg; test with this procedure, no reference is necessary:
Sub OfficeConstantsList()
Application.ScreenUpdating = False
Dim R, Member, i As Long, oPath As String
oPath = Application.Path & "\excel.exe"
With CreateObject("TLI.typelibinfo")
.ContainingFile = oPath
Workbooks.Add
For Each R In .Constants
i = i + 1
Cells(i, 1) = R.Name: Cells(i, 1).Font.Bold = True
Cells(i, 2) = "Value": Cells(i, 2).Font.Bold = True
Cells(i, 2).HorizontalAlignment = xlRight
For Each Member In R.Members
i = i + 1
Cells(i, 1) = Member.Name
Cells(i, 2) = Member.Value
Next Member
Next R
End With
Columns("A:B").Columns.AutoFit
Range("A2").Select
ActiveWindow.FreezePanes = True
Range("A1").Select
End Sub

MP

"Greg Rivet" a écrit dans le message de
...
Can't find the tlbinf32.dll. Help

Greg
"Michel Pierron" wrote in message
...
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










All times are GMT +1. The time now is 12:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com