How to save Excel file contains VBA Macros code
When using advanced Excel, not only complex Excel functions, but also add ins, or Excel code VBA Macros are used by a lot of people, especially VBA Macros. With the VBA Macros code, users can set repetitive actions from simple to complex that we do not need to manipulate from the beginning.
However, when you save the Excel file using the VBA Macros code in the usual way, the VBA Macros will only be used in one calculation and set the value only, cannot be reused if the user has needs apply to other files. The code used in the file automatically disappears when you save the file as usual. So, does backing up Excel files contain VBA Macros code so they work again when opening the file? The following article of Network Administrator will guide you how to do it.
- How to break VBA password in Excel
- MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks
- How to send email from Excel spreadsheet with VBA script
- How to install VBA in Excel
Instructions for saving Excel file VBA Macros
Step 1:
Take, for example, a flash text editor on Excel that uses VBA code.
If the user saves the Excel file that contains the VBA code in the usual way with the default format * .xlsx, the following message will be displayed. The content of this message can be understood if you save this file, you cannot save the contents in Macro Excel. If you press Yes to save, the Macro code will be deleted. If you press No, cancel the save command.
At the interface of the file, click the Office icon and select Save As .
Step 2:
Switch to the folder view, choose where to save the file and then in the Type Save section select Excel Macros-Enabled Workbook from the list but not the Excel Worbook format as default. Click Save to save the Excel file with Macros.
If you receive the message as shown below, press Ok to continue.
Step 3:
Open the folder to save Excel file will see 2 files with the same name but different.The file contains VBA Macros with an exclamation icon as shown.
The format of the file containing VBA Macros is * .xlms and the original Excel file is in * .xlsx format.
Step 4:
Now open the file containing the VBA Macros, if the content has VBA Macros code that is not available and has the following interface, click Options .
Click on Enable this content to display the content containing the Macros VBA code on the Excel document, then click Ok below.
The result of using Macros VBA code on Excel has been displayed again.
The operation to save Excel files containing VBA code Macros will be different when you save the Excel file normally. The default format for saving Excel files is * .xlsx and * .xls, and the format when saving an Excel file contains a VBA code for * .xlsm or xlsb with an exclamation mark next to the Excel file icon for easy identification. . When you reopen the file, users can still use VBA, edit the values if desired.
I wish you all success!
You should read it
- How to Use Macros in Excel
- Instructions on how to create and use macros in Excel Create macros, save macros, run macros
- MS Excel 2007 - Lesson 7: Create Macros in Excel 2007
- The easiest way to Use Macros in Excel
- Instructions for creating Macros in Excel
- What is a macro in Excel? How to create and run a Macro in Excel
- How to enable macros on Excel
- How to turn on, turn off, delete Macro in Excel
- Microsoft Excel test P5
- A complete guide to Excel 2016 (Part 4): How to store and share spreadsheets
- MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks
- Test your understanding of Excel