How can we help you?

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.

macros_editor_VBA_banner

On the Macros tab, click t_macros_editor_icon 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.

macros_editor_VBA

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

macros_editor_VBA_1

If an error occurs during conversion or when running a macro, the Open file in Excel button will appear in the Macro editor window. Clicking this button will open the document in Excel, allowing you to check the accuracy of the original VBA code. The button only appears on Windows with Excel installed and remains in the Macro editor window until it is closed.

4.Close the Macro editor window.

5.Save the document in .xlsm format so that you don't lose the original VBA macros.

Was this helpful?
Yes
No
Next
Rewrite the macro code