Locking the VBA Project

J

John

Hi Everyone
In the Project menu, I selected my project, right click "VBA Project
Properties". The Tab -Protection, I check mark "Lock Project for Viewing"
with password. That works fine.
Problem:
If someone use any macro in that workbook, then before closing the workbook it
request a Password and you can't cancel that menu.
I don't get it, maybe I'm at the wrong place to protect my project from view.
Can enyone enlighten me.

Regards
John
 
A

Andy Smith

You must have self-modifying code! The only way it wouold ask for the
project password is if code gets changed.
 
J

John

Thank you Andy for your reply.
I try it on something smaller, a simple userform and I get the same thing.
Something weird with my computer...
Any idea to trouble shoot the problem, setting in Option I might of change,"God
knows"
Regards
John
 
J

John

Hi Again
I opened a new workbook and recorded a simple select range, erase.
this one is not asking for the password.
The other two have userform in them.????
Any ideas
Regards
John
 
D

Dave Peterson

Any chance you have an older version of Google Desktop Search (or some desktop
search utility) running?

This was a problem with the google version (a longggggggg time ago). But it was
fixed pretty quickly. If you're running GDS, then try getting a new copy.
 
J

John

Hi Dave
Thanks for your reply.
AFAIK I've got nothing working in the background.
Computer is 2 years old running Windows Vista, MS Office 2003
I tried different script and it looks like the userform are causing the problem.
I'm using RefEdit control, could that be a problem.
Regards
John
 
J

John

Hi Again
Not true the information I gave you about Userform.
I did more test and from previous post
I opened a new workbook and recorded a simple select range, erase.
this one is not asking for the password.
It's not asking for the password only if you don't go to the VBA editor and try
to open it.
I'm lost
Regards
John
John said:
Hi Dave
Thanks for your reply.
AFAIK I've got nothing working in the background.
Computer is 2 years old running Windows Vista, MS Office 2003
I tried different script and it looks like the userform are causing the
problem.
I'm using RefEdit control, could that be a problem.
Regards
John
 
J

John

More info:
Is it normal the first time only you go to the VBA Editor and select your
project, you are ask for the password but if you press cancel instead of typing
in the password I get a popup menu " System Error&H80004005 (-2147467259)"
That error only happens one the first time you go in that menu.
John
John said:
Hi Again
Not true the information I gave you about Userform.
I did more test and from previous post
I opened a new workbook and recorded a simple select range, erase.
this one is not asking for the password.
It's not asking for the password only if you don't go to the VBA editor and
try to open it.
I'm lost
Regards
John
 
D

Dave Peterson

I remember (mis-remember???) a similar problem.

I was trying to record a macro in a workbook that had it's project protected.
The action of starting to record a macro actually creates a new module in that
protected project. And I got that prompt when I tried to close.

But this was in xl97. I just tried the same thing in xl2003 and no prompt when
closing.

Sorry it didn't help.
More info:
Is it normal the first time only you go to the VBA Editor and select your
project, you are ask for the password but if you press cancel instead of typing
in the password I get a popup menu " System Error&H80004005 (-2147467259)"
That error only happens one the first time you go in that menu.
John
 
P

Peter T

Another possibility, some sort of error inside the project might be trying
to display itself to the user. No doubt you've locked the project for a
reason, but if you can, give it to the user with instructions how to unlock
the project. Once inside note if the code is stuck on a yellow line, or
and/or an error message displaying, or look at Tools / References for any
reference ticked and marked as "MISSING".

Regards,
Peter T
 
J

John

Thanks you for trying Dave.
Regards
John
Dave Peterson said:
I remember (mis-remember???) a similar problem.

I was trying to record a macro in a workbook that had it's project protected.
The action of starting to record a macro actually creates a new module in that
protected project. And I got that prompt when I tried to close.

But this was in xl97. I just tried the same thing in xl2003 and no prompt
when
closing.

Sorry it didn't help.
 
J

John

Hi Robert
I went to my Registry Editor but I don't have this text line >
HKEY_CURRENT_USER\Software\Microsoft\Office\Excel\Addins\
Office.Desktop.Google.com\LoadBehavior .
Thank you for your help.
Regards
John
Robert Flanagan said:
John, try the Password Prompt Fixer at
http://www.add-ins.com/password_problem.htm. Most likely it is Google
Desktop. If the exe doesn't fix, try the manual instructions.

Robert Flanagan
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
J

John

Hi Peter
I followed your instructions and nothing seems abnormal.
Thank you for your help.
Regards
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top