Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Hebrew in a Macro
Hi,
I need to be able to write hebrew letters to an excel spreadsheet from my macro. I already have hebrew support installed on Windows XP. What is the simplest way to do this? I noticed I can't type in hebrew withen the Macro - is there a way to hard code any text? Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Hebrew in a Macro
Use unicode. Write the characters as unicode and set a font to support the
characters. see: http://unicode.org/charts/PDF/U0590.pdf -- Gary''s Student - gsnu200718 "Yehuda" wrote: Hi, I need to be able to write hebrew letters to an excel spreadsheet from my macro. I already have hebrew support installed on Windows XP. What is the simplest way to do this? I noticed I can't type in hebrew withen the Macro - is there a way to hard code any text? Thank you |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Hebrew in a Macro
Whilst you cannot type Hebrew (or rather any non-ANSI text) in the VBE, you
can work with its Unicode numbers, either Hex or decimal and the ChrW function. If you are bring this Hebrew text into VBA from outside (a text file or some other app) look into using Byte arrays and StrConv. Dim Unicodes As Variant Dim i As Long Const SomeHebrewHexCodes As String = "05D0,05E0,05D2,05E6" For Each Unicodes In Split(SomeHebrewHexCodes, ",") Range("A1").Offset(i, 0).Value = ChrW("&H" & Unicodes) i = i + 1 Next You can get the code for any letter on the worksheet with: Public Function GetUnicodeValue(argText As Variant, _ WhichLetter As Long, _ Optional AsDecimal As Boolean = True) As Variant GetUnicodeValue = AscW(Mid(argText, WhichLetter, 1)) If AsDecimal = False Then GetUnicodeValue = Hex(GetUnicodeValue) End Function NickHK "Yehuda" wrote in message ... Hi, I need to be able to write hebrew letters to an excel spreadsheet from my macro. I already have hebrew support installed on Windows XP. What is the simplest way to do this? I noticed I can't type in hebrew withen the Macro - is there a way to hard code any text? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
tsv file open in turkish font and it should be hebrew why ? | Excel Discussion (Misc queries) | |||
hebrew dates | Excel Discussion (Misc queries) | |||
Sort by Hebrew Date | Excel Discussion (Misc queries) | |||
Insert Hebrew Date | Excel Worksheet Functions | |||
Hebrew inverted characters macro | Excel Programming |