Getting Excel VBA Project Password Prompt While Closing – Know How to Resolve

Is your VBA Project password prompt on exit? There are problems encountered every day by coders and developers creating new programs. They post it in forums and blogs to get free advice on specific issues. This helps others in finding answers to similar situations. There is one such peculiar difficulty reported by an individual who was getting Excel VBA Project password prompt while closing. This happened repeatedly in closing an Excel workbook. There was no specific solution provided for the problem nor was it completely understood. There are some manual means that have worked for some of the users which are mentioned in this post. Read the complete article to find out why VBA Password prompt when closing Excel and how to unlock VBA Project password XLA/XLS files.

Summarizing the Issue with Excel File Keeps Asking For Password

This happens when exiting a workbook within VBA project. A dialogue box that appears that needs to be cancelled twice or more times to properly exit the worksheet. It somewhat looks like the image below:

VBA Project Password

It can real hassle for customers or client using the Excel file and have no knowledge of the code within it.

Possible Reasons of Getting Excel VBA Project Password Prompt While Closing

Following are some of the common problems that might be the reason for this problem:

  • Incorrect Way of Handling References: There are objects and modules under each program code. These are properties or functionalities which can be referenced by a child object from a parent. Sometimes these are not closed properly causing password prompt VBA project appears after Excel quits.
  • Offending Add-ins: Enterprise software designing companies provide added functionality for better document management and printing. These may not be coded correctly to interact with Excel worksheet causing bugs and errors. Some of them include Adobe Acrobat, Microsoft Office Live COM add-in, Dropbox, MS Encarta, Acrobat PDFMaker and many more.
  • Google Desktop: Some of the features are incompatible with Excel and causes VBA password prompt on close.

Smart Ways to Recover Excel VBA Password from XLA/XLS Documents


Here are some of the manual methods that can be used to prevent password prompt from reappearing or to resolve this issue when VBA Project password prompt on exit:

Solution#1: Exit All Add-ins

Follow the steps given below to recover and unlock a VBA Project XLA/XLS file:

  1. Go to Excel >> File >> Options >> Add-ins.
  2. Then, go to Manage and select COM Add-ins.
  3. Exit All Add-ins to Recover VBA Project Password

  4. Finally, click the Go button to VBA disable password prompt.
  5. Also, exit Google desktop, installed on the local machine and try to close the workbook again.

Solution#2: Change Settings in Excel

Another way to fix this issue of VBA Password prompt when closing Excel document is:

  1. First, open macro-enabled spreadsheet (*.xlsm file) and press ALT+F11 key.
  2. Then, select Tools >> References.
  3. Exit All Add-ins to Recover VBA Project Password

  4. From the References – VBA Project dialogue box, uncheck the box before OLE Automation and click OK.
  5. Exit All Add-ins to Recover VBA Project Password

  6. Now, go to Debug >> Compile VBAProject. This is to check whether this is what caused password prompt VBA project appears after Excel quits.
  7. If it works then save the changes made and close.

Solution#3: Edit Registry Entry

Read and implement the following steps to unlock and access password encrypted VBA Excel file:

  1. First, create a restore point and backup the registry before making any changes.
  2. Then, go to Regedit and change the LoadBehavior entry value from 3 to 2.
    Note: Also, make sure all the latest Windows and Office updates are installed.

Apart from the above solutions, there is one other approach to resolve this issue of getting Excel VBA Project Password prompt while closing. This is a recommended to opt a reliable third-party tool to break VBA Project password in an easy way.

Better and Smarter Way to Remove VBA Excel Password


The manual ways may not be feasible for customers or clients using the actual workbook. They would rather just go for a faster, automated solutions than contacting their IT team or the module creator. One such professional software is the VBA Password Remover to remove this "password prompt for VBA project appears after Excel quits" issue. It is designed to be used by even a non-technical person with simple functions and GUI. All the magic happens with just a click of a few buttons. Here are some noted features of the tool:

  • Works on all Office file types to remove VBA password
  • Compatible file formats: .doc, .xla, .xls, .dot, .mdb
  • Works on Windows 10 and all earlier versions(32 or 64-bit)
  • Ability to recover multilingual password of any length

What We Have to Say

There is a lot of time and efforts required to find out the root cause and eliminate the issue when VBA Project password prompt on exit. It may be specific for a workbook and trying different code may not even work. There are some proven methods that have in fact worked for some users. Most of them have been covered in this post. If one is still getting Excel VBA Project password prompt while closing, they can go for automated solutions. One of the reliable, efficient, cost-effective product is also discussed in this post.