{"id":14905,"date":"2018-07-04T14:27:21","date_gmt":"2018-07-04T14:27:21","guid":{"rendered":"http:\/\/learnexcelmacro.com\/wp\/?p=14905"},"modified":"2022-08-17T19:16:47","modified_gmt":"2022-08-17T19:16:47","slug":"vba-to-save-macro-free-copy-of-a-workbook","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2018\/07\/vba-to-save-macro-free-copy-of-a-workbook\/","title":{"rendered":"Methods to save a Macro FREE copy of a workbook [FREE DOWNLOAD]"},"content":{"rendered":"
[et_pb_section fb_built=”1″ admin_label=”section” _builder_version=”4.16″ da_disable_devices=”off|off|off” global_colors_info=”{}” da_is_popup=”off” da_exit_intent=”off” da_has_close=”on” da_alt_close=”off” da_dark_close=”off” da_not_modal=”on” da_is_singular=”off” da_with_loader=”off” da_has_shadow=”on”][et_pb_row admin_label=”row” _builder_version=”4.16″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” global_colors_info=”{}”][et_pb_column type=”4_4″ _builder_version=”4.16″ custom_padding=”|||” global_colors_info=”{}” custom_padding__hover=”|||”][et_pb_text _builder_version=”4.17.6″ _module_preset=”default” global_colors_info=”{}”]Dear Friends,<\/p>\n
This is a very simple yet powerful Excel VBA tip for you. Many a time before sending your workbook with Excel VBA Macro code in it, you want to save your workbook without any VBA code in it. Follow the below steps to save a copy of your workbook as Excel Macro FREE. There will be no excel Macro code in the copy saved.<\/p>\n Go to File Option and Click on Save AS of your xlsm file as shown in the below picture:<\/p>\n Excel Workbook with Excel Macro in it<\/p><\/div>\n Now save your workbook as xlsx<\/em><\/strong> and not as xlsm<\/em><\/strong> as shown in the below picture<\/p>\n VBA To SaveAs xlsx<\/p><\/div>\n On clicking on save, you receive following confirmation popup, once you click on “Yes” then your excel workbook will be saved without Excel Macro code.<\/p>\n Confirmation Popup – Save Excel without Excel Macro Code<\/p><\/div>\n Now once you open your .xlsx workbook, you would not see any of the excel macro code as shown in below picture:<\/p>\n Excel Workbook Without Macro<\/p><\/div>\n Now as you have seen how to achieve this manually, I will show you how you can achieve this by using Excel VBA.<\/p>\n Following VBA statement will be able to save your Workbook with Excel Workbook as a Workbook without any Excel VBA code in it.<\/p>\n While executing the above, VBA statement, you will receive the same confirmation popup as shown above – which you get while saving your .xlsm workbook as .xlsx. Refer the below VBA code to save your Excel workbook without saving any VBA code in it.<\/p>\n
\nTherefore here in this article, I will show you – how to save your Excel Workbook without excel macro in it.
\nThis can be done manually as well as using Excel VBA.
\nAt the end of this article, I have a usage example of this VBA method. You can also download a FREE Excel Workbook<\/strong> for you to understand and play around.<\/p>\nMethod 1: Manual : Save a Copy of Excel workbook without Macro in it manually <\/a><\/h4>\n
Method 2: VBA: Save a Copy of Excel workbook without Macro using Excel VBA<\/a><\/h4>\n
Download an Excel Workbook to play around [FREE DOWNLOAD]<\/a><\/h3>\n
Manual Method: Save Workbook without Excel Macro<\/h1>\n
Step 1:<\/h4>\n
Step 2:<\/h4>\n
Step 3:<\/h4>\n
<\/a>
Step 4:<\/h4>\n
<\/a>
VBA Method: Save Workbook without Excel Macro using Excel VBA<\/h2>\n
\nThisWorkbook.SaveAs Filename:=\"C:\\...\\abc.xlsx\", FileFormat:=xlOpenXMLWorkbook\n<\/code><\/pre>\n
\nThis can be annoying in an automated process. To ignore this popup in Excel VBA code, you simply use Application.DisplayAlerts to false before executing the above statement.<\/p>\nSave Excel workbook as Excel Macro FREE Workbook without confirmation Popup<\/h2>\n
\nApplication.DisplayAlerts = False\nThisWorkbook.SaveAs Filename:=\"C:\\...\\abc.xlsx\", FileFormat:=xlOpenXMLWorkbook\nApplication.DisplayAlerts = True \n<\/code><\/pre>\n
Example of usage of above Code<\/h1>\n