Top 5 Ways To Recover Macros From Corrupted Excel File

Are you also worried about how your macros deleted after closing Excel file or where macros disappeared in Excel? But just don’t have any clue on how to recover macros in Excel, then fear not!

In this blog, I have provided complete detail about Excel macros and a variety of different tricks to recover macros in Excel.

Best Software To Recover Macros In Excel

For the macros recovery in Excel, I recommend you all to go with the powerful tool embedded with a strong algorithm i.e MS Excel Repair Tool

Using this professional recommended tool you can easily repair corrupt, inaccessible damaged Excel(.xls and .xlsx) files. This tool allows to easily restore all corrupt Excel file including the charts, worksheet properties cell comments, and other important data.

Try Now       Buy Now
* Free version of the product only previews recoverable data.

With the help of this, you can fix all sorts of issues, corruption, errors in Excel workbooks. This is a unique tool to repair multiple excel files at one repair cycle and recovers the entire data in a preferred location. It is easy to use and compatible with both Windows as well as Mac operating systems. This supports the entire Excel versions and the demo version is free.

Steps to Utilize MS Excel Repair Tool:

excel-repair-main-interface-1
stellar-repair-for-excel-select-file-2
stellar-repair-for-excel-repairing-3
stellar-repair-for-excel-preview-4
stellar-repair-for-excel-save-5
stellar-repair-for-excel-saving-6
stellar-repair-for-excel-repaired-7
previous arrow
next arrow

About Excel Macros Corruption:

Microsoft Excel is a very popular application of Microsoft Office. This is used to carry out various functions like carry out complex calculations easily, data entry, maintaining stats, financial data, and many others.

Excel is quite a complex application besides its popularity. This is used by the professional as well as for personal use. Excel is having various inbuilt features and functions to make the work easy for the users like macros, fill handle, pivot table etc.

A Macro is one of the most powerful but underutilized features of Excel. And this can be defined as the recording of a series of tasks in an Excel workbook. This is commonly used for replacing the repetitive series of keyboard and mouse actions in the MS Excel spreadsheet.

Making use of the Macros will help you to save your precious time and even increase your productivity. But in many cases, the Excel workbooks get corrupted and as a result of the entire data stored in it also gets corrupted.

Moreover, in many cases, it is seen the Excel macros recovery will help you to recover data from corrupt Excel file.

So in this article, I will share complete information about how to recover macros from corrupted workbooks.

Before moving toward the fixes check out some user experiences regarding missing macros in Excel.

User Queries:

Let describe this more briefly with the user’s experience:

I have a file that I ran some macro on it, I had the function on a text file but it has been deleted, so I just need to get the macro back, I still have the file that I ran the function on it but when I go to the macros by typing Alt+F8 the list is empty, I try to create a function in order to get into Microsoft Visual Basic window (when I put the function in the first place) and search there to see if the function I saved somewhere but it didn’t… is there any way that I can find the function from the file that I ran the function on it? Like history that keeps all macros that used on the file or something like that?

Thanks, everyone… 

                                                                                                Original post from Microsoft Community

It’s time to move on to or next section i.e how to recover macros from a corrupt Excel workbook.

How To Recover Macros From Corrupt Excel File?

Well, there are certain ways that help you to recover macros in Excel but this also depends on some parts. Such as how  Excel workbook got corrupted or in which part of Excel file does the corruption actually encountered?

However, it is found that just like other data recovered from the corrupted Excel workbook, users can also recover Excel macros too.

To make this Excel Macros recovery task easier for you, I have already suggested you with the software solution at the very beginning of this blog.

So you can try restoring data from the corrupt Excel workbook, by making use of the MS Excel Repair Tool to recover and repair corrupt macros Excel file automatically.

If you want to fix corrupt macros in Excel manually then try some of the working steps that help you to know how to recover corrupted macro-enabled Excel files.

Method 1: Set the Calculation Method to Manual

When the Excel file fails to open the workbook on its own then this step will help you to fix the issue.

Follow steps to reset calculation setting:

  • Open Excel file but not the corrupted
  • Then from Tools menu > choose Options > click Calculation tab.

Set the Calculation Method to Manual

  • In Excel 2007, click the Office button > Excel Options > choose Formulas in the left panel.

Set the Calculation Method to Manual 1

  • Lastly in the Calculation section > click Manual >

Set the Calculation Method to Manual 2

I hope doing this will help you to recover corrupted workbook data.

Now after setting the calculation mode to manual try the below-given steps to restore macros in corrupted Excel file.

Method 2# Change Macro Security Options

  • From Tools menu choose Macro > select Security > option.
  • Or in Excel 2007, click Office button > choose Excel Options > select Trust Center in the left panel.

trust-center-in-excel-options-dialog

  • Next, click on the Trust Center Settings button > choose Macro Settings >Disable All Macros (without Notification in the Macro Settings section) > click OK

  • Then open the corrupted workbook and if the workbook opens, a notice appears Macros are disabled.
  • But if in case the Excel doesn’t open or shut down, then this method won’t work for you.

Method 3# Export Personal Macro Workbook

Just like other VBA codes, Excel macros saved in the Personal.xlsb can easily be exported to the .bas file.

For exporting Personal Macro Workbook, perform the following steps:

  • Now hit Alt+F11 to open the Visual Basic Editor (VBE).
  • Now press Ctrl + R to use the Project Explorer > locate module you want to Save
  • And right-click the module name > select Export File

Set the Calculation Method to Manual

  • Close VBE > exit Excel
  • Close the VBA Editor and get out of Excel.
  • For importing .bas file which is shared by someone. Make a right-click on the module present in the PERSONAL.XLSB within which you are willing to store the macros. After then choose the Import File option.

Doing this will help you to recover macros from corrupted Excel file. This solution has worked for many users, so try it.

Method 4# Enable Personal Macro Workbook

When the macros disappeared in Excel, the very thing we all thought that it may get deleted. But in most cases, it is found that macros get hide after being disabled during an Excel crash.

Follow the steps mentioned below to find the Personal.xlsb file and execute it again.

Steps to Enable the Personal Macro Workbook

  • Open your Excel application first. After then go the File tab and hit the Options.

Restore from File Recover

  • Tap to the Add-ins menu which resides on the left-hand side’s dialog box

excel-add-ins

  • Within the Manage drop-down, choose Disabled Items
  • Now you have to select the Personal Workbook and tap to the Enable.

Enable Your Disabled Macros

  • After performing all the steps restart the Excel Application.

FAQ Related To Excel Macros:

Where Are Excel Macros Stored In Windows 10

Location Of Excel Macros In Windows 10/Windows 7/Windows Vista:

C:\Users\user name\AppData\Local\ Microsoft\Excel\XLStart folder

Location Of Excel Macros In Windows XP:

C:\Documents and Settings\user name\Application Data\Microsoft\Excel\XLStart folder

All the Excel workbooks contained in the XLStart folder get opened automatically every time when you starts an Excel application.

Any code which you have kept in the personal macro workbook will get listed in the macro dialog.

How Do I Permanently Save A Macro In Excel

Do you know, by saving macros within PERSONAL.xlsb you can apply the Excel macro to entire of your workbooks which you open or run in your PC.

Save a macro to your Personal Macro Workbook:

  • On the Developer tab hit the Record Macro option.
  • In the dialog box of Record Macro, go to the store macro in box. From the drop options of store macro in choose the Personal Macro Workbook.
  • At last tap to the OK option.

save excel macro

  • Before exiting Excel, you are asked to save changes that have made in the Personal Macro Workbook. So, tap to the Save.

Unhide Personal Macro Workbook:

For editing macros which are kept in the personal macro workbook, the very first thing you need to do is unhide the personal macro workbook.

  • In any of your open Excel workbook, go to the view tab and hit the Unhide option.

Unhide Personal Macro Workbook

  • From the opened dialog box, choose the PERSONAL.
  • Choose and edit macros which is saved in the Personal Macro Workbook.
  • After making changes, Save it. Don’t forget to hide the workbook after making complete changes.

Unhide Personal Macro Workbook 1

Note: Macros stored within the personal.xlsb in one PC don’t work on other PC.

Conclusion:

This is all about how to recover corrupted macro enabled Excel file. I have tried my best to share the best methods to recover macros from corrupted Excel workbooks. So, do try all the aforementioned fixes and don’t forget to share your experiences with us.

Additionally, it is recommended to handle the Excel file properly and follow the best preventive steps to protect Excel files from getting corrupted.

If, in case you have any additional questions regarding how to recover macros in Excel, then do tell us in the comments section below.

Good Luck….



Priyanka is a content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.