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.

  1. How to break VBA password in Excel
  2. MS Excel 2003 - Lesson 8: Excel Macro - Automate complex tasks
  3. How to send email from Excel spreadsheet with VBA script
  4. 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!

3.8 ★ | 17 Vote

May be interested

  • How to create a guessing game on PowerPointPhoto of How to create a guessing game on PowerPoint
    powerpoint guessing game slides are made up of different pieces, accompanied by questions with different answers.
  • How to cut photos using Microsoft PowerPointPhoto of How to cut photos using Microsoft PowerPoint
    powerpoint is a software used for presentations, it needs a design tool to create compelling presentations. therefore, you need to learn how to manipulate images and create interesting effects with photos in powerpoint. this article will show you three ways to edit photos in powerpoint.
  • How to delete dynamic effects on PowerPointPhoto of How to delete dynamic effects on PowerPoint
    we can delete or disable an effect on a slide or the entire effect in a powerpoint file.
  • How to insert a clock into PowerPointPhoto of How to insert a clock into PowerPoint
    users can add clocks to powerpoint slides, with available clocks or watch clocks on the web.
  • 5 best alternatives for Microsoft ExcelPhoto of 5 best alternatives for Microsoft Excel
    the hunt for the best excel alternative has never cooled down. microsoft excel has always been the number one name in the field of spreadsheet processing. thankfully, there are some alternative spreadsheet software available for free, performing the same functions as excel.
  • 5 best free alternatives for Microsoft AccessPhoto of 5 best free alternatives for Microsoft Access
    like many other database programs, microsoft access is a complex tool that takes a lot of time to explore and explore. therefore there are microsoft access alternatives and the following are some of the best options.