A macro is a series of commands that you can use to automate a repeated task, and can be run when you have to perform the task.
And in Excel, there are two methods to do this.
Before you modify the settings, you need to open the macro settings window. Enable or disable macros in Office files, Open the Macro Settings Dialog.