From: Bob Alhat on
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

From: GS on
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

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


From: Dave Peterson on
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.

Bob Alhat wrote:
>
> 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

--

Dave Peterson
From: Bob Alhat on
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


"GS" <gesansom(a)netscape.net> wrote in message
news:hu42fc$rls$1(a)news.eternal-september.org...
> 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
>
> --
> Garry
>
> Free usenet access at http://www.eternal-september.org
> ClassicVB Users Regroup! comp.lang.basic.visual.misc
>
>