UCASE

UCASE(string)

Returns the text string with all the characters converted to uppercase (Variant / String).


stringThe text string (String).

REMARKS
* If "string" is Null, then Null is returned.
* All non letter characters remain unchanged.
* You can use the LCASE function to return a text string with all the characters converted to lowercase.
* You can use the STRCONV function to convert to propercase.
* You can use the UCASE$ function to return a String data type instead of a Variant data type.
* The equivalent Excel function is Application.WorksheetFunction.UPPER
* The equivalent .NET function is Microsoft.VisualBasic.Strings.UCase
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print UCase("UPPERCASE")    '= "UPPERCASE"  
Debug.Print UCase("UpperCase") '= "UPPERCASE"
Debug.Print UCase("uppercase") '= "UPPERCASE"
Debug.Print UCase("123ABC456") '= "123abc456"
Debug.Print UCase("7890") '= "7890"

Dim sResult As String
sResult = UCase("aBcDe")
Debug.Print sResult '= "ABCDE"

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top