View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
TKS_Mark TKS_Mark is offline
external usenet poster
 
Posts: 68
Default Japanese in Macros

On the Japanese computer, the code for 集 is char(15672). But on the English
computer, char(15672) returns #VALUE!. And when I use the function
=code("集") on the English computer, it returns the answer 63. But when I
write =char(63) (or chr(63) in a macro) on the English computer, it returns
the question mark character "?".

Any ideas? It seems the chr results are different depending on the
computer's language.

"PA" wrote:

the chr() function is the same as the character function in Excel (not sure
of the name, I have french Excel). To get help on it, type chr in the VBA
editor and press F1.

Basicly, what it does is to return a character based on a number (0-255). So

Chr(74) & Chr(97) & Chr(112) & Chr(97) & Chr(110)

will return "Japan"

Explore a bit on it. Maybe you can return character from a different set of
letters (Japan).

Give me some news.

PA

"TKS_Mark" wrote:

What is the chr() function? Unfortunately, my programming experience it
limited to recording macros and trying to modify them slightly. If you give
me a hint, I can probably experiment and figure it out.

"PA" wrote:

Can you build your string in japan using the chr() function? Obviously, I
didn't try it on my computer;)

PA

"TKS_Mark" wrote:

I'm sharing an Excel 2007 file with coworkers in Japan. I use the indirect
function to build a formula based on several cells. The problem is, these
don't work on Japanese computers, so the formula results in #REF!

I was able to record a macro on a Japanese computer to translate from
English to Japanese:

Cells.Replace What:="[#Totals]", Replacement:="[#WŒv]", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

The WŒv looks like [#集計] on the Japanese computer. When I run the above
program, nothing happens. There are no warnings, etc. When I paste from the
Japanese macro into the Excel file, it also looks like WŒv.

How can I get the Japanese to be properly recognized?