VBA Project asking for a password when closing

Les Williams

New Member
Joined
Aug 2, 2006
Messages
24
Hi Gang
Does anybody know why my VBA Project would ask for a password when closing. This presents a problem, because I can't give the password out to people or it defeats the whole purpose of protecting the project.
Can anyone help?
Thanks
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
Hi,

what password is it asking for ?
example
do you hide sheets in the "beforeclose"event while your workbook is protected ? ... then you need to provide the password in your code

see PROTECT in the VBA-helpfiles

kind regards,
Erik
 

Les Williams

New Member
Joined
Aug 2, 2006
Messages
24
It's asking for the password that I used to protect the project. There are NO hidden sheets and I don't use the "beforeclose" event. I do however hide the row and column headers and the tabs and use the User Form to navigate through the project.

On occasion the project also appears twice in the explorer panel. Is there any explanation for this?
Thanks
Les in Toronto
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
there are different kinds of passwords
access to the workbook
structure of the workbook
sheets
VBA-project

to be sure for 100%: please confirm you are talking about the last one !?
(I know you wrote "VBA-project" but sometimes people use such terms arbitrarely)

the only reason I can see to ask a password for the project is, that you are trying (by code) to change something of its contents

or your project might be corrupt ?
It is very easy to corrupt a macro module - especially when making lots of changes during development.

A way of "cleaning" the code is to copy/paste it into Notepad (not Word), delete the old module, then copy/paste the code back into a new module.

This also refers to worksheets - so, with a big project, at some late stage it is a good idea to remake everything starting from a new workbook and copy/pasting formats & formulas (ie. contents, not complete sheets) to new sheets.
 

Forum statistics

Threads
1,141,043
Messages
5,703,917
Members
421,321
Latest member
blusky4

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
Top