Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I am currently developing some VBA code for a chinese company. I would like to display some chinese onto the Excel worksheets through VBA. If I type chinese directly onto the excel worksheets I have no problem displaying them, but when I try to display them through VBA code all I get is ?? For example, Range("A1") = "你好" Would just make Cell A1 display as ?? Is there anyway I can make VBA display the chinese text properly? -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A1").Value = ChrW(20320) & ChrW(22909)
NickHK "FCC" wrote in message ... Hello, I am currently developing some VBA code for a chinese company. I would like to display some chinese onto the Excel worksheets through VBA. If I type chinese directly onto the excel worksheets I have no problem displaying them, but when I try to display them through VBA code all I get is ?? For example, Range("A1") = "你好" Would just make Cell A1 display as ?? Is there anyway I can make VBA display the chinese text properly? -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How did the numbers 20320 and 22909 represented those characters? Is there some kind of character list? -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You provided those character codes, so I don't know where you got them from.
However, you use the Character Map (which is AFAIK available on all systems) to see the Hex codes for characters in various fonts/character sets. You also have the VBA function ChrW and ASCW. It depends somewhat on where your Chinese characters are coming from and what you are doing with them. NickHK "FCC" wrote in message ... How did the numbers 20320 and 22909 represented those characters? Is there some kind of character list? -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Opps, I actually typed by response incorrectly. I meant to say How did you know the numbers 20320 and 22909 represented those characters? But in any case, I found the character Map on my operating system (XP Home), but I am unable to display the hex let alone even search for the characters I want. I chose the character set Unicode and chose the font PMingLiU (which is by default available as a font for all windows machines) and then I tried to search for words and nothing happened. Can you explain how you were able to find the hexcodes? Thanks -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Hex code is shown in the bottom left hand corner.
But if know the text you need to use, you can paste it into Excel, then CharCode=AscW(Mid(Range("A1").Value,i,1), where i =1,2 or whatever. But if have the text, can you not just it in Excel and forget about the VBA side ? NickHK "FCC" wrote in message ... Opps, I actually typed by response incorrectly. I meant to say How did you know the numbers 20320 and 22909 represented those characters? But in any case, I found the character Map on my operating system (XP Home), but I am unable to display the hex let alone even search for the characters I want. I chose the character set Unicode and chose the font PMingLiU (which is by default available as a font for all windows machines) and then I tried to search for words and nothing happened. Can you explain how you were able to find the hexcodes? Thanks -- FCC ------------------------------------------------------------------------ FCC's Profile: http://www.excelforum.com/member.php...o&userid=35888 View this thread: http://www.excelforum.com/showthread...hreadid=556805 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 traditional chinese to simplified chinese | Excel Discussion (Misc queries) | |||
Chinese in VBA | Excel Programming | |||
numbers in chinese | Excel Programming | |||
Chinese | Excel Programming |