Special keystrokes in a Macro

E

Eric

When ALT + 0176 is pressed you get the degree symbol. Likewise you get the
sigma character when you press ALT + 997. I would like to incorporate these
type of keystrokes into a macro. Is it possible, and if so, how? Thank you
in advance for your time and effort.

Eric Pearce
 
E

Eric

That works for ASCII characters, but I need to access unicode characters as
obtained by use the keystrokes like ALT+0176 = 'degree symbol', and ALT+997
= 'sigma', etc... Chr() errors at anything above 255. Is there another
way?
 
G

Gord Dibben

Eric

Example code using Chr

Sub sq_Meters()
Selection.NumberFormat = "0"" m" & Chr(178) & """"
'0179 for cubic meters
End Sub


Gord Dibben Excel MVP
 
E

Eric

Apparently I am not explaining myself very well. If I were to press and
hold the ALT key and while holding down the ALT key were to press the number
sequence 997 then release the ALT key the greek symbol sigma will apear in
the current font. However, the Chr() function doesn't recognize anything
above 255. Therefore, I can't access any of the greek symbols which reside
in the numbers above 255. I really do understand the Chr() function and it
will not work for what I am trying to do. I really do appreciate the
suggestions to date, but they don't work. Is there anyone out there that
can help? Thanks in again, and in advance.

Eric
 

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