How to use Macro to Save a Book without Prompting Step by Step (Example)

Undoubtedly, it is very important to learn to use Microsoft Office, since it offers programs like Excel which allows hundreds of activities to be carried out. These include the function of use macro to save a workbook without asking.

Macro comes from the word macro. Since through it the orders that the user details can be saved so that they can be executed later, it only has to be programmed. It is important to note that Macro is used to eliminate the warning that appears every time you want to save an Excel worksheet.

So by activating the function you will be able to automatically save the work carried out without having to display the dialog box. The macro serves the function of helping to automate the tasks of the worksheets.

With Macro you can save the books without asking

You may also be interested in:

The steps to get the Excel workbook to save automatically without the need for the program to ask whether or not you want to save the file will be explained below. First of all, Excel must be opened and when they are located in the worksheet, click on save the file in the upper left of the window.

Excel macro option

Then you can choose location path to save work, so you can select the location you want, in this case you can select desktop. In file name the name of the job is added and in type, it must be enable option for Macros and finally it is saved.

Once it is located again in the worksheet, click on the «programmer» tab found in the upper menu. When entering, click on the option «Visual Basic» which is on the left side of the menu, then a new window opens where you have to choose «ThisWorkbook».

By selecting the option, two options will be displayed on the white worksheet that can be seen. So in the first option you have to click on «Workbook» and in the second option next to it, choose «BeforeClose».

Similarly, when you click on the two options in the list, a writing is automatically displayed at the bottom of the white sheet. Then it must erase the writing which is displayed below the dividing line then over the word «End Sub» the Macro should be done.

Before closing Excel macro save the workbook

So you must enter «ThisWorkbook.Close SaveChanges: = True» then click on save and you can close the tab. Then you can notice the Excel worksheet or workbook normally, so you can start working without any problem.

Green background, Excel icons

It can be located in the cell you want enter the dataAt the end you can click on the «X» to close the program. At that moment you will notice that the workspace goes blank, the file disappears.

Later you have to click on the «X» again to close the program, which closes without any inconvenience and without displaying the dialog box with the warning if you want to close. Then you can locate the work in the path described above, if you selected to save it to the desktop, the book will be found there.

In this way Excel automatically saves changes that were applied in the workbook, it should also be noted that the macro process will be effective for all worksheets in Excel. You can also run a macro automatically when you open an Excel workbook.

In the same way, you can work on sheet 2 and sheet 3 and close the program, since when you open it again the work will remain the same.

Everything is automatically saved so you can work without worrying about losing your job and you will avoid seeing the warning next: Do you want to save the changes made to (job name)? …

In short, having this tool is a good option to close the program easily without displaying the save notice. So you can rest assured that the automatic save if it worked, in addition, Macro works with the entire Excel workbook.

Source by

How useful did you find this content?

Click on a star to rate!

Average score 0 / 5. Counting of votes: 0

So far, no votes. Be the first to rate this content.

I'm sorry this content was not useful for you!

Let me improve this content!

Tell me, how can I improve this content?

You may also be interested in:

Deja un comentario