Chinese fonts in a string

Leo_Polla_Psemata

Registered User.
Local time
Today, 13:25
Joined
Mar 24, 2014
Messages
364
协议号 Rate Item or AF No:

Hi everyone
In a VBA line, i want to write the following.

.Range("A3").Value = "协议号 Rate Item or AF No:"

But it turns out like this

.Range("A3").Value = "??? Rate Item or AF No:"

How can i convince VBA to accept this - > 协议号
 
Hi, many thanks, i don't want/need to bring another language in my keyboard preferences/
I want to copy paste a text from Chinese and appear in VBA as is, now, when i copy paste the chinese fonts turn to ???

This Chinese text will appear in an excel form header
 
See if you can use the relevant CHR value for those characters OR use a font that includes those as part of its character set.
Having said that I just pasted the example text into a table without any difficulty

1599153541521.png


FWIW the font is Calibri. Perhaps you can find a suitable font in the VBE Editor options
 
Last edited:
the font for that characterset is SimSun which is available in the vba editor - however copy/pasting the character having changed the font still results in a ? - but that may be because of the copy/paste. First character seemed to translate to the word 'Print' when I went to a new line - but it may have been something I did.
 
I would go with isladdogs suggestion to use CHR. Typing it directly into the vba project won't work i don't think.
 
you do not need Chr() function in your worksheet.
you can paste the chinese word to another worksheet and
use concatenation to create your header.
 

Attachments

See if you can use the relevant CHR value for those characters OR use a font that includes those as part of its character set.
Having said that I just pasted the example text into a table without any difficulty

View attachment 84747

FWIW the font is Calibri. Perhaps you can find a suitable font in the VBE Editor options

Hi, indeed, i can also copy paste the Chinese in table or form label without problem, but i can't copy paste in the vba editor .
 
Did you try using SimSun as previously suggested?
 
look at the sample .xlsm file.
you add the Chinese word to a sheet (you can even Hide that sheet).
you only need to Concatenate it in VBA.

run Sub test() on Module1.
 

Attachments

look at the sample .xlsm file.
you add the Chinese word to a sheet (you can even Hide that sheet).
you only need to Concatenate it in VBA.

run Sub test() on Module1.
thank you arnelgp, i am trying to perform all this in vba through ms access.

Just to give few more info.
In one shot, i need to copy paste in the (MS ACCESS) vba editor chinese, and see chinese, not ??? .

In more shots
I am exporting a report from ACCESS to EXCEL.
In access all data pieces are stored in normal Latin characters/ digits

HOWEVER the excel report is addressed to European and Chinese management
and it has on it lines and colon headers half latin half chinese.

So far, i am reaching my goal through a "finishing touch" , i export from access to excel, in excel i see the ??? ,
then i just copy paste the Chinese lines from the original excel template and replace the ??? and that's it.
No big deal, i can continue the finishing touch through "copy paste" primitive way for ever.

But, the challenge is there. How can i copy paste chinese in vba editor in access ??
 
Instead of trying to copy and paste literal Chinese characters in the vba editor, try using ChrW() to perform the necessary conversions?
 

Users who are viewing this thread

Back
Top Bottom