Greek letters in Label caption

D

daniel.hurst

Hi,

Is there possibility to use in a Label caption the greek letter? And
more generally in captions of the ActiveX controls?

Regards

Dan
 
T

Tom Ogilvy

You can only assign one font to the controls. So if you only want greek
symbols, assign the Symbol font. If you want mixed english and greek, then
.. If you have Windows XP/2000/NT4, and have a unicode font on your machine,
Such as Arial Unicode MS, you can assign that font to the label or control
and then use the initalize event of the userform

Private Sub Userform_Initialize()
Label1.Caption = chrw(65) & chrw(928)
End Sub

for example which puts in a Capital A and the greek sympol uppercase PI.
 
D

daniel.hurst

Thanks. And what about Text+Symbol in the same Label caption. Is there
such possibility

Dan
 
D

daniel.hurst

Thanks Tom,

For Label on Sheet correctly is

---------------------------
Private Sub Worksheet_Activate()

Label1.Caption = "Zmiennosc" & ChrW(928)

End Sub
--------------------------- ?


Regards

Dan
 
D

daniel.hurst

Thanks Tom,

For Label on Sheet correctly is

---------------------------
Private Sub Worksheet_Activate()

Label1.Caption = "Text" & ChrW(928)

End Sub
--------------------------- ?


Regards

Dan
 
N

NickHK

Daniel,
Use the Character map, charmap.exe.
Depending how your system is set up, it may be on the Start menu, under
Accessories>System Tools.
Set the font you are using, locate the required symbol, then look at the
bottom right hand corner for something like "U+03A0: Greek Capital Letter
Pi". That the number in Hex that you need for ChrW().

NickHK
 
N

NickHK

Daniel,
That's because you need to take the number 03A0, which is in hex and added
"&H" in place of "U+".
(Or convert the hex to decimal.)

NickHK
 
T

Tom Ogilvy

Not sure where this went yesterday, but another way to display the characters
and their Integer index number is:

Sub showCharacters()
Dim v(0 to 65535, 0 to 1) as Variant
Dim i as Long
Columns(1).Font.Name = "Arial Unicode MS"
for i = 0 to 65535
v(i,0) = chrW(i)
v(i,1) = i
Next
Range("A1:B65536")=v
End Sub

Change the Font Name to any Unicode Font.

The Greek Symbols will be around Row 929
 

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

Top