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.
How to save Excel file contains VBA Macros code Picture 1
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.
How to save Excel file contains VBA Macros code Picture 2
At the interface of the file, click the Office icon and select Save As .
How to save Excel file contains VBA Macros code Picture 3
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.
How to save Excel file contains VBA Macros code Picture 4
If you receive the message as shown below, press Ok to continue.
How to save Excel file contains VBA Macros code Picture 5
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.
How to save Excel file contains VBA Macros code Picture 6
The format of the file containing VBA Macros is * .xlms and the original Excel file is in * .xlsx format.
How to save Excel file contains VBA Macros code Picture 7
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 .
How to save Excel file contains VBA Macros code Picture 8
Click on Enable this content to display the content containing the Macros VBA code on the Excel document, then click Ok below.
How to save Excel file contains VBA Macros code Picture 9
The result of using Macros VBA code on Excel has been displayed again.
How to save Excel file contains VBA Macros code Picture 10
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
Maybe you are interested
Instructions for converting numbers to words in Excel
How to calculate the number of days between two time points extremely quickly using Excel
How to Justify Text in Cells on Excel - Adjust Text Spacing
How to strikethrough text in Word, write strikethrough text in Word and Excel
Instructions for using the TRIMRANGE function to clean up Excel tables
Keyboard shortcuts in Excel 2007, 2013, 2016, 2010, 2003, 2019, 2021