LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBAProject remains open after Workbook closes

Hello,

I have an Excel 2003 workbook VBA project that creates an Access 2003 .mdb
when the workbook opens (via DAO), and later deletes the .mdb when the
workbook closes. Subsequent code creates and appends a new DAO.TableDef
object to the database. The TableDef is created as a linked table, linking
to data that is in the Excel worbook.

(Admittedly, this is somewhat of a circular arrangement, but required by the
project's needs. The Excel data needs to be reshaped and reported upon in
Excel. Using DAO and multiple run-time generated SQL statements, I can
facilitate this in mere seconds, while an Excel-based formulaic approach to
the report(s) take several (read 7-10) minutes to calculate. There will be
multiple end-users so my solution needs to be quick and robust.)

My problem is when the workbook closes, and I set all my DAO objects to
Nothing and delete the temp database file, the VBAProject hangs around in the
Excel VBIDE. Normally, any VBA library associated with an .xls file goes
away when the .xls closes. Not in this case. Also, EXCEL.EXE is still
running in Task Manager.

I've been able to assertain (via commenting- and uncommenting-out code) that
problem lies with the code that creates the linked table, which as I
mentioned, references the Excel file data.

How do I make the VBA library go away when it should, or better put, what am
I doing that is causing it to stick around? Again, all object references are
set to Nothing in the Workbook_Close Event.

Any help or comment is greatly appreciated.

Thanks in advance,
tchid2
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
Excel program remains open after closing file RPC Excel Discussion (Misc queries) 9 February 7th 08 07:59 PM
VBAProject remains open after file is closed sequoia sam Excel Discussion (Misc queries) 4 August 2nd 05 07:59 PM
Open workbook and Excel closes Stuart[_5_] Excel Programming 6 November 25th 04 11:37 AM
Closed workbook remains in memory. Kent Prokopy[_3_] Excel Programming 6 December 4th 03 01:37 PM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"