The VBA UCASE function is listed under the text category of VBA functions. When you use it in VBA code, it converts the supplied string into an upper case string. In simple words, upper case string is where you have all the characters in capital letters. It works the same as we have the UPPER function in the worksheet.
- String: The string value which you want to convert into upper case.
To practically understand how to use VBA UCASE function, you need to go through the below example where we have written a vba code by using it:
Sub example_UCASE() Range("B1").Value = UCase(Range("A1")) End Sub
In the above code, we have used the UCASE to convert the text from the cell A1 into an upper case text and it has returned it in the cell B1 as EXCEL CHAMPS.
- UCASE doesn’t make any changes in punctuation and numbers.