Excel 2007 - VBA Password Input shows after Excel is closed


B

Bob Alhat

Excel 2007/Vista Business

I've had problems I've seen documented (but but resolved) elsewhere, with
Excel crashing on the execution of ActiveWorkbook.Close False. 'Cured' that
with Application.Quit (not ideal), but now, after Excel closes, the VBA
Project password input box is displayed. It takes 3 clicks on Cancel to
dismiss it. If I unprotect the VBA Project, Excel closes silently, as I
would expect.

My code is a bit complex to post here, but the ThisWorkbook module code no
longer includes Workbook_BeforeClose procedure, in case you're wondering.

Anyone come across this issue before?

TIA
Bob
 
Ad

Advertisements

G

GS

Bob Alhat used his keyboard to write :
Excel 2007/Vista Business

I've had problems I've seen documented (but but resolved) elsewhere, with
Excel crashing on the execution of ActiveWorkbook.Close False. 'Cured' that
with Application.Quit (not ideal), but now, after Excel closes, the VBA
Project password input box is displayed. It takes 3 clicks on Cancel to
dismiss it. If I unprotect the VBA Project, Excel closes silently, as I would
expect.

My code is a bit complex to post here, but the ThisWorkbook module code no
longer includes Workbook_BeforeClose procedure, in case you're wondering.

Anyone come across this issue before?

TIA
Bob

Are you saying that procedure is no longer available, OR that you no
longer use it?

In the case of it's no longer available then your file is corrupt. Not
surprising and is why some people use an Auto_Close procedure in a
standard module instead.

You could try running Rob Bovey's CodeCleaner addin to see if it fixes
anything. www.appspro.com

I recommend you also ditch using the ThisWorkbook module for your
startup/shutdown routines, and keep use of it to monitoring workbook
events only. Ideally, an events class would even be better but that's a
bit complex to get into at this point.

HTH
 
D

Dave Peterson

I've never seen this in xl2007, but I don't use that version very often.

But I did see it in xl97 or xl2k. I'd see it when I started to record a new
macro into that workbook's protected project. It's been awhile, but I think the
cause was that a new module was created when the recorder started (and failed).

The other time I saw this is when I was using an early version of Google
desktop. Google desktop indexes all that junk in the file and it would try to
index the code in the modules, too.

But this, too was a longgggg time ago.

If you didn't try recording a module or you don't have google desktop running,
then you can ignore this message.
 
Ad

Advertisements

B

Bob Alhat

Thanks for your help GS & Dave.
Regrettably, CodeCleaner did not do the trick. If I find a fix, I'll report
back.

Thanks again,
Bob
 

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