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