How to Use the Correct VBA Function to Convert Text to Lowercase in Excel
Question details
The user needs to convert text to lowercase using an Excel VBA macro but encounters an error when attempting to use the standard Excel LOWER function.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Writing or executing a VBA macro that involves modifying the case of a text string to entirely lowercase.
- Observed behavior
- Calling Lower or WorksheetFunction.Lower directly within the VBA code produces a runtime error because the function is not supported as a method of WorksheetFunction.
Ensure that the Developer tab is enabled in your spreadsheet program and make a quick backup of your existing macro code before applying modifications.
Use the Built-in LCase Function in VBA
Replace the unsupported WorksheetFunction.Lower method with VBA's native LCase function to successfully convert text to lowercase.
Because VBA provides a native equivalent to Excel's LOWER function, the LOWER method is intentionally excluded from the WorksheetFunction object. Attempting to call it will trigger a runtime error.
The native VBA function LCase is highly efficient, works directly with string variables, and requires no special object references.
Launch your Excel workbook and press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
In the Project Explorer panel, double-click the Module containing the macro where you want to perform the lowercase conversion.
Find the line causing the error and replace WorksheetFunction.Lower(myInput) with the native syntax: myTest = LCase(myInput).
Save the changes and run the macro to verify that the text string is properly converted to lowercase without generating errors.

Write and Run VBA Macros Seamlessly in WPS Spreadsheet
WPS Office provides excellent built-in support for VBA macros in its Spreadsheet application. You can write, execute, and debug code just like you would in Microsoft Excel, including native functions like LCase and UCase.
- 1. Launch WPS Spreadsheet: Open WPS Office and create a new or open an existing Spreadsheet document.
- 2. Access the Developer Tools: Navigate to the Developer tab on the top ribbon menu.
- 3. Open the VBA Editor: Click on the Visual Basic icon or use the ALT + F11 shortcut to launch the macro programming environment.
- 4. Write your LCase code: Insert a new module and apply the LCase function directly to your string variables, then save your file as a macro-enabled workbook to preserve the code.

Frequently Asked Questions
Why does WorksheetFunction.Lower cause an error in VBA?
VBA intentionally excludes LOWER from the WorksheetFunction object because it already contains a built-in equivalent called LCase. When VBA encounters WorksheetFunction.Lower, it throws a runtime error because the method is simply not defined in that library.
How do I change text to proper case (title case) in VBA?
Unlike lowercase and uppercase, VBA does not have a native Proper function. To convert text to proper case, you must either use the StrConv function formatting like StrConv(text, vbProperCase), or call the worksheet function via Application.WorksheetFunction.Proper(text).
Does the LCase function affect numbers and symbols within a string?
No, the LCase function strictly targets alphabetical characters. Any numbers, punctuation marks, or special symbols contained within the string variable will be ignored and remain completely unchanged.




