Forum Discussion

SarahIhab's avatar
SarahIhab
Copper Contributor
Jul 07, 2022

VBA code outputs Arabic characters wrong

Hello,

I've been having a problem with writing and displaying Arabic characters in excel and VBA.

In excel I found a solution that I have to change the pc region and language to Arabic and it worked.

In VBA I found a solution to show the characters when I write them in the code and this also worked. But when I output this value it shows as weird characters or as question marks.

 

 

Here's the VBA solution to show the characters when I write them in the code. And you can see that it worked since there's a string written in Arabic.

 

Now for the execution of the above code:

 

 

The first line outputs the value of the cell written in Arabic and the output is correct.

 

The second line displays the Arabic string written in the code and as you can see it displays something different.

 

Can anyone help me with this problem?

Share

Resources