[Excel VBA code] Convert a string to Uppercase letters

Excel VBA code to convert a string to uppercase letters. It converts all lowercase letters to uppercase.

Sub convertStringToUpperCase()
'macro to convert a string to uppercase letters
exString = "helLo how Are yOU" ' Example string
stringAfterConversion = StrConv(exString, vbUpperCase) ' Converting the string letters to uppercase
MsgBox ("string after conversion to uppercase is - " + stringAfterConversion)
End Sub



About the Author


A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

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