excel VBA 代码中不显示阿拉伯字符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18868029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Arabic characters don't show in excel VBA code
提问by CloakMaster
I can't write arabic strings in VBA code in excel, it shows as weird characters. Tried it on many machines with excel 2013 or 2010, on windows 8 or windows 7, with or without arabic proofing tools installed. Arabic language is already installed on all machines, system locale is arabic. There's no problem typing arabic characters on excel worksheets or even MS word but not in VBA code. Please help.
我无法在 Excel 的 VBA 代码中编写阿拉伯字符串,它显示为奇怪的字符。在许多装有 excel 2013 或 2010 的机器上,在 Windows 8 或 Windows 7 上,无论是否安装了阿拉伯文校对工具,都进行了尝试。所有机器上都已安装阿拉伯语,系统区域设置为阿拉伯语。在 excel 工作表甚至 MS word 上输入阿拉伯字符没有问题,但在 VBA 代码中则不然。请帮忙。
回答by Hallow Salih
in VB Editor: - 1- click tools 2- Select Options... 3- click Editor Fofmat 4- Change font to(Courier New (Arabic)) 5- click OK now you can write in both English and Arabic I hope this will solve your problem
在 VB 编辑器中:- 1- 单击工具 2- 选择选项... 3- 单击编辑器格式 4- 将字体更改为(Courier New(阿拉伯语)) 5- 现在单击确定,您可以用英语和阿拉伯语书写我希望这会解决你的问题
回答by M.Flifl
In Windows XP:
在 Windows XP 中:
- > Control Panel
- > Regional and Language Options
- > Advanced Tab
- > Select Arabic (depending on your country) You will be asked to insert the Windows CD, insert it and then browse to the I386 Folder then press ok.
- > restart the PC and it should work now fine.
- > 控制面板
- > 区域和语言选项
- > 高级选项卡
- > 选择阿拉伯语(取决于您所在的国家/地区) 您将被要求插入 Windows CD,插入它,然后浏览到 I386 文件夹,然后按确定。
- > 重新启动 PC,它现在应该可以正常工作了。
I beleve it's the same on Windows 7, the whole problem is in the non-unicode programs section set it to Arabic.
我相信它在 Windows 7 上是一样的,整个问题在于非 unicode 程序部分将其设置为阿拉伯语。
回答by Eqbal Vakilzadeh
In win 10, you must change your system locale to match your language. You can find it here: 1- Press win key or click on it 2- Type region and click on it when windows finds it 3- Choose administrative tab 4- Under the language for non-unicode programs you will find "change system locale" key 5- A restart would be required
在 win 10 中,您必须更改系统区域设置以匹配您的语言。您可以在这里找到它: 1- 按 win 键或单击它 2- 输入区域并在 Windows 找到它时单击它 3- 选择管理选项卡 4- 在非 unicode 程序的语言下,您将找到“更改系统区域设置”关键 5- 需要重新启动