Take a Guess to Win Windows 10 Pro Key!
previous arrow
next arrow
Slider

How to Save the Workbook Containing VBA Code

Date:2020-11-6 Author:Sandra

Starting from the 2007 version of the office, when saving a workbook containing VBA code for the first time, Excel will prompt “cannot be saved in macro-free workbooks”.

This is because the workbook containing VBA code must be saved as a macro-enabled workbook type. Excel provides an xlsm type workbook for this purpose, which is called “macro-enabled workbook”.

How to Save the Workbook Containing VBA Code

Save Macro-enabled Workbook

When saving for the first time, the aforementioned prompt box will pop up. In order to save the VBA code, select “No” among them. In the Save As window, select “Excel Macro-Enabled Workbook (*.xlsm)” in the Save Type list.

How to Save the Workbook Containing VBA Code

After saving, you will find the workbook type from xlsx becomes xlsm.

Copyright Statement: Regarding all of the posts by this website, any copy or use shall get the written permission or authorization from Myofficetricks.

Leave a Reply

Your email address will not be published. Required fields are marked *