What is a Macro-Enabled Workbook?
In Excel, when you write a macro or add VBA codes in a file, you need to save that file as a macro-enabled type in the .xlsm format. With this file type, Excel stores all the codes in the file. And you can run those codes from the file as well.
Here you have a file with the codes, and now, we will look at how to save this file as a macro-enabled file type in Excel.
Steps to Save a Macro-Enabled Workbook
- First, go to the File tab and click on the “Save As” option.
- After that, specify the location where you want to save your file.
- Next, from the “Save as type” select “Excel Macro-Enabled Workbook”.
- In the end, click OK to save the file.
Below you can see the file we have saved in our system as a .xlsm extension.
Points to Remember
- Once you create a macro-enabled file, you need to activate the macro (File ⇢ Options ⇢ Trust Center ⇢ Trust Enter Settings ⇢ Macros) to run a code.
- You can use Personal Macro Workbook to save all your codes in one place.
- Receiving a macro-enabled workbook from someone else (from a different system) could be a possible threat.