Put cyrillic chars from VB to Excel

How can i put cyrillic characters to Excel using VB? I have the unicode for the chars i need to use. For example, \u0419 (ƣ)

Now i'm using the following code:

But this shows an ? in excel. (also in clipboard)
 Set ObjExcel = New Excel.Application
 ObjExcel.Workbooks.Open ("c:\tom.xls")
 Clipboard.SetText (Chr(4) & chr(19))
 ObjExcel.Workbooks(1).Close SaveChanges:=True
 Set ObjExcel = Nothing

Trying to write to a text file was succesful!
Open "c:\tomresult.txt" For Output As #1
Print #1, Chr(255) & Chr(254) & Chr(19) & Chr(4)
Close #1

Please HELP!
Who is Participating?
moduloConnect With a Mentor Commented:
PAQ-ing the question and refunding 250  points

Thanks  OHDev2004 !


Community Support Moderator
Experts Exchange
Read this man ,, its a matter that when you copy the cyrillic code the clipboard converts it to the pagecode of the windows, ,, so you need a 3rd parity software as mentioned in the link below ,,

tofraAuthor Commented:
The complete progress is, greb data from mysql database, put it into the excel file. Because everything is automated, i can't use this manual action. The purpose i'm using it for is to create an invoice with cyrillic chars. (customs demand it)
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

i know but when you paste the text to the clipboard it's converted to nonunicode
then you try to paste it ,,
look there is another way for doing this :

the string abcd is actually U+0061 U+0062 U+0063 U+0064

so i think you must make a routine to get the character or its unicode then return the code as above then copy it to clipboard ,, and paste it as you've done ,,,,
tofraAuthor Commented:
I found it!
Instead of using the clipboard for pasting my text to excel, i can do it directly!

 ObjExcel.Range("A1").Value = ChrB(19) & ChrB(4)
Now i saw the cyrillic character.

Still, i find it strange that the clipboard can't work together with vb and handle unicode. Copy past with notepad works well.

it's because of the Pagecode of the russion or cyrillic  isnt installed on the system :)
no problem :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.