Cannot Edit a Macro on a Hidden Workbook Error. How to Solve it?

So recently I received an Excel file that contained macros which I didn't need. So I opened up the macro list from view and went to delete those macros. But surprisingly I was not able to delete some macros.

The error said, "Cannot edit macros on a hidden workbook. Unhide the workbook using the Unhide command."

I was confused because the workbook I was using was already Unhidden that is why I was able to open it. Right? Then why this error? And after some online research I got the answers and solved the issue.

How do you delete or edit a macro in a hidden workbook?

First rule: You can't Edit or Delete a macro in a hidden workbook from Excel view.

To be able to edit or delete a macro in a hidden workbook from Excel view do this:

Go to  Ribbon --> View --> Windows Group --> Unhide

Click on the Unhide option. It will list the hidden workbooks that are open.

Click OK. If the file is not protected with a password, it will get unhidden immediately. Otherwise you will need to enter the password.


Now if you try to delete the macro, it will show no error.


How is the Excel file hidden if it is open already?

Well this happens when you have add-ins added to the file. The add-in file can be hidden but when you open Excel it opens with it to provide its features. If you try to edit or delete macros from these files, you will get the same error message.

I don't have any addin?

If you think you don't have any add-ins, you are right to think so. Excel has a default add-in file called PERSONAL.xlsb. This file opens up every time you open Excel.

If the macro you are trying to delete is in a PERSONAL.xlsb file, you will need to unhide it first.

If you are unable to unhide the file from Excel. Then you can locate the file in File Explorer. This file is usually stored at this generic location.


Right Click on the folder. Go to properties. Here, uncheck the hidden property and hit OK.

Now explorer will ask if you want to make changes to sub folders and files or only to this folder. Check out the second one. Click on the OK button. Now all the files within that folder will be unhid and macros on them are open to edit or delete.


Now If I try to delete the macro from this excel I will be able to do so.

Note:- If you use this method, make sure that you reopen Excel.

So yeah guys, this is how you can edit or delete from a hidden workbook and get rid of the error "Cannot edit macros on a hidden workbook. Unhide the workbook using the Unhide command". I hope this is helpful. If it doesn't help you, let me know the problem you are facing, in the comments section below. Till then, keep learning, keep Excelling.

Related Articles:

Reference Isn't Valid Excel Error and How to Solve It? : This error occurs when we refer to an object or location that doesn't exist or have changed. To solve this problem we track down the reference.

How to Solve "Ambiguous Name Detected" VBA Error : While working with VBA you may get this error popup when you run the procedure. This error says "Ambiguous name detected: procedure name". In this article, we will learn why this error occurs and how we can solve it.

What Application.Screenupdating = False Means and Why is it Used in VBA: Screenupdating is a property of application objects in VBA. It can be set to TRUE or FALSE. It is like a switch, that can be turned On or Off.

"You've Entered Too Few Arguments For This Function" Excel Error and How to Solve It? : You may have observed the "You've Entered Too Few Arguments For This Function" error while using Excel. This happens when you don't provide all the mandatory arguments to the a function in an Excel formula.

Popular Articles:

50 Excel Shortcuts to Increase Your Productivity | Get faster at your task. These 50 shortcuts will make you work even faster on Excel.

How to use Excel VLOOKUP Function| This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets. 

How to use the Excel COUNTIF Function| Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.

How to Use SUMIF Function in Excel | This is another dashboard essential function. This helps you sum up values on specific conditions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.