Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Profil Cristina02
Femeie
23 ani
Arges
cauta Barbat
26 - 80 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Use Unicode (hex) Characters in VBA (diacritice) Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 739
First off you must write down the characters you want to use:

1. Get pen and paper, or use notepad or Word or whatever
2. In Excel Go to Insert - Symbols - Symbol (to open the Symbol dialog box)
3. Font should be (normal text)
4. At the bottom right, above the Insert - Cancel buttons make sure the from: selection is Unicode (hex).
5. Select the needed characters in the list and write down the Character code at the bottom right of the dialog box

Now to insert those characters in cells with VBA, you must use the following syntax:

ChrW(&H0103)

where 0103 is the character code you copied at point 5.

&H tells the ChrW function that it must insert Unicode hex characters.


pus acum 3 ani
   
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 739
Chr() function won't work for characters over 255 Hex.

For example for the character:
ă
the code in Symbols is
0103
and that converted in Windows Calculator to HEX is
259

That's why for extended ASCII you must use
ChrW() function


pus acum 1 an
   
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 739
keyword: diacritics

pus acum 1 an
   
Pagini: 1  

Mergi la