To automatically convert VBA macro code to a new macro with similar code in Lua, follow these steps:
1.Open an .xlsm document with a VBA macro.
2.Open the Macro editor window in one of the following ways:
•On the info banner, click Open VBA interpreter.

•On the Macros tab, click
Macro editor.
3.Select the desired VBA macro and click Convert. All macros with VBA code will have a corresponding label next to their name.

The editor will create a new macro associated with the VBA macro with the same name and code in Lua.

4.Close the Macro editor window.
5.Save the document in .xlsm format so that you don't lose the original VBA macros.