UCase 函数UCase function

返回包含转换为大写字母的指定字符串的 Variant (String)。Returns a Variant (String) containing the specified string, converted to uppercase.



必需的_字符串_参数是任何有效的字符串表达式The required string argument is any valid string expression. 如果_字符串_包含 Null,则返回 NullIf string contains Null, Null is returned.


仅将小写字母转换为大写字母;所有大写字母和非字母字符保持不变。Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.


此示例使用 UCase 函数返回字符串的大写版本。This example uses the UCase function to return an uppercase version of a string.

Dim LowerCase, UpperCase
LowerCase = "Hello World 1234"    ' String to convert.
UpperCase = UCase(LowerCase)    ' Returns "HELLO WORLD 1234".

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.