简体   繁体   English

Excel VBA:使用值> 255时chr函数错误

[英]Excel VBA: chr-function error when using value > 255

I'm trying to print the lambda (λ) character using following code: 我正在尝试使用以下代码打印lambda(λ)字符:

depug.print chr(964)

I looked up the specific value for lambda for the chr-function here . 在这里查找了chr函数的lambda值。 Unfortunately I get a Runtime-Error 5 with the information that it is an invalid value. 不幸的是,我收到一个Runtime-Error 5信息,提示它是一个无效值。

I found out this seems to appear using values over 255. 我发现使用超过255的值似乎会出现这种情况。

Now I am curious , how to print that lambda character? 现在我很好奇 ,如何打印该lambda字符? Respectively any other greek character? 分别还有其他希腊人物吗?

You should be able to use 您应该可以使用

 ActiveCell.Value = ChrW(&H3BB)

credit: https://www.w3.org/Math/characters/html/symbol.html just replace 00 with &H 信用: https : //www.w3.org/Math/characters/html/symbol.html只需将&H替换为00

This thread also shows a link to a unicode converter Special characters(letters) in excel VBA (čćžšđ) 此线程还显示指向unicode转换器的链接excel VBA(čćžšđ)中的特殊字符(字母)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM