The VBA LCase function converts a supplied String into lower case text.
The syntax of the function is:
Where the String argument is the text string that you want to convert to lower case.
In the following example, the VBA LCase function is used to convert the String "John Paul Smith, DOB 11/12/1982" to lower case text.
' Convert a string to lower case text.
Dim str1 As String
' The variable str1 is now equal to "john paul smith, dob 11/12/1982"
str1 = LCase( "John Paul Smith, DOB 11/12/1982" ) |
After running the above VBA code, the variable str1 is equal to the String "john paul smith, dob 11/12/1982".
Note that the LCase function leaves punctuation and numbers unchanged.