UCase VBA function – How to use the Ucase function

1. UCase VBA function – Description

UCase VBA function converts all letters in a string to uppercase. You can compare it to the CAPITAL function in an Excel worksheet. How to use UCASE function in VBA Excel? In the argument of the function, enter a string in quotation marks, or refer to any text variable String. Functions can be compared to UpperCase or Upper functions in other programming languages.

2. VBA UCase function – Syntax

Ucase (String)

String – The text string in which we want to convert all letters to uppercase.

Function return : String / text value

3. VBA UCase function – Example

How to use UCASE  function in VBA Excel? Below is an example of using the UCASE  function  in the VisualBasic Editor.

Sub UCaseExample ()

MsgBox UCase ("Learning Function")
Range ("A1") = UCase ("Learn Function")

End Sub
Excel VBA functions - UCase VBA function
Excel VBA functions – UCase VBA function

4. UCase VBA function – Where to use?

The function can be used in: Excel 2003, Excel 2007, Excel 2010, Excel 2013, Excel 2016.

The article is part of the VBA Excel function list. You can find a list of all VBA functions at this address: VBA functions

Leave a comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: