VBA Project Password Request on Exit

ilya2004

Board Regular
Joined
Mar 17, 2011
Messages
135
Hi all,

Has anyone ever come accross this error:

I have a macro-enabled tool that I send to different users. One of them showed me that when she closes out from the spreadsheet on her computer, it prompts her for the VBA project password after the spreadsheet has already closed. She has to click cancel 10-15 times or enter the password that I have put on the project.

Any ideas what it could be?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi all,

Has anyone ever come accross this error:

I have a macro-enabled tool that I send to different users. One of them showed me that when she closes out from the spreadsheet on her computer, it prompts her for the VBA project password after the spreadsheet has already closed. She has to click cancel 10-15 times or enter the password that I have put on the project.

Any ideas what it could be?

have a read of this article & see if helps

Dave

Password prompt for VBA project appears after Excel quits
 
Upvote 0
This is a problem that has intermittently plagued my own Excel VBA add-ins for a small number of customers. I've documented the problem in my online documentation: VB Password Dialog - Peltier Tech Charts for Excel - Documentation.

While working on a specific situation for a client, I came up with a solution. I don't know if it only works for his situation (on just my machine) or if it is more widely applicable.

Insert the line "ThisWorkbook.Saved = True" at the end of the Workbook_BeforeClose event:

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ' blah blah before close code

    ThisWorkbook.Saved = True
End Sub

If anyone has a chance to try this, could you let me know if it helps for you and/or your clients.
 
Last edited:
Upvote 0
Just tried this as my worksheet has the VBA password box popup frequently, and it did not work.
 
Upvote 0

Forum statistics

Threads
1,221,444
Messages
6,159,914
Members
451,603
Latest member
SWahl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top