UCASE(string)

Returns the text string with all the characters converted to uppercase (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 convert 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/String 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 docs.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

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