I have a worksheet with Hebrew word "שלום" in cell A1.
I am trying to run this VBA code:
Sub test()
Dim str As String
str = Range("A1")
MsgBox str
End Sub
The message box displays:
????
Also, when I try to write Hebrew characters in VBA code:
if range("A1") = "שלום" then 'do something...'
instead of Hebrew letters I see gibberish.
I use Excel 2016 on Windows 10. Hebrew language pack is installed.
I did not face this problem in Excel 2010 on Windows 7.
Anyone with an idea for enabling Hebrew (or Unicode in general) in VBA code?