ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA project does not close when workbook is closed (https://www.excelbanter.com/excel-programming/313826-vba-project-does-not-close-when-workbook-closed.html)

SimonN

VBA project does not close when workbook is closed
 
I have a large project that uses VBA to open and close files. The project is
password protected. I recently ran into a problem whereby a password prompt
appears when closing Excel and VBA projects remain open after the
corresponding workbooks have been closed.

This error was apparently caused by omitting statements in the style of 'Set
objectName to Nothing' before closing the workbook (a solution documented in
other forums). This has since been corrected. The password prompts no
longer appear and workbooks are closed by the code without problems.

However, the problem I now have is that VBA projects now remain open for any
spreadsheet that is manually opened and closed (regardless of whether they
have any code in them). Re-opening the same file causes a second instance of
the same project to appear. They remain open until Excel is shut down.

I have tried cleaning my code and re-installed Excel but have been unable to
find a fix. I have found references to other people seeing similar symptoms,
but no solutions. My suspicion is that there may be some sort of hangover
issue in the registry or with DLLs, as all workbooks are affected.

I am using Excel 2002 with SP3 (although identical symptoms have been seen
on a colleague's machine which runs Excel 2003).

Any assistance would be greatly appreciated.

Simon.

BrianB

VBA project does not close when workbook is closed
 

There is no point in multi-posting, if someone can answer they will.
I generally ignore multi-posts because I find that someone has probabl
answered another one somewhere else.

In this case, having tried other solutions and failed, I would gues
that my workbook has become corrupt (a very common ocurrence
especially if heavy coding involved) and take steps to transfe
everything bit by bit to a new workbook, testing each time

--
Brian

-----------------------------------------------------------------------
BrianB's Profile: http://www.excelforum.com/member.php...tinfo&userid=5
View this thread: http://www.excelforum.com/showthread.php?threadid=27001


Simon Norris

VBA project does not close when workbook is closed
 
To clarify, the problem must exist within somewhere external to the workbook
as it is experienced when *any* workbook is opened (although it seems to
have been triggered initially by a problem with a specific workbook, which
has since been fixed).

It is not fixed by re-installing either Excel (or the entire Office suite).

I have been unable to find a specific reference to anyone experiencing this
problem for all workbooks. At the moment the only option (which is not very
appealing!) seems to be a complete rebuild of the two machines on which the
offending workbook has been opened.

Cheers
Simon.


"BrianB" wrote in message
...

There is no point in multi-posting, if someone can answer they will.
I generally ignore multi-posts because I find that someone has probably
answered another one somewhere else.

In this case, having tried other solutions and failed, I would guess
that my workbook has become corrupt (a very common ocurrence,
especially if heavy coding involved) and take steps to transfer
everything bit by bit to a new workbook, testing each time.


--
BrianB


------------------------------------------------------------------------
BrianB's Profile:
http://www.excelforum.com/member.php...info&userid=55
View this thread: http://www.excelforum.com/showthread...hreadid=270010




BrianB

VBA project does not close when workbook is closed
 

Try temporariliy removing links in Tools/Addins
Check XLSTART folder to see if there is anything there

--
Brian

-----------------------------------------------------------------------
BrianB's Profile: http://www.excelforum.com/member.php...tinfo&userid=5
View this thread: http://www.excelforum.com/showthread.php?threadid=27001



All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com