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: 4
Default Repost Excel Crashes on Workbook close!!

I have been experiencing a strange problem when closing one of my workbooks
which connects to the SQL server via ado. After the workbooks with code is
closed if another workbook is open and I click on another workbook, excel
will crash. If however I click on outlook or another office application,
bring it to focus and then go back to excel its fine. I have checked to
make
sure all object are being released. Any ideas... James--------------

Make sure your code has some DoEvents in (2 or 3 sometimes) before it ends
to allow Excel to clear the message queue. Also make sure you do not
reference any forms, or if you do make sure to set everything to nothing.

I have had similar probs, eventually I think it ended up being an implicit
reference to a function in a form (should have been in a module anyway).

cheers
Simon


--------------Added a couple of DoEvents and still having the same problem.
There are no forms involved just querying the SQL Server using ADO and
running it through some formulas and closing the workbook. When closing the
workbook if I have excel save the workbook this problem goes away but if I
set thisworkbook.close SaveChanges:=False excel will crash after I activate
another workbook.Help is greatly appreciated!!James


 
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
Excel crashes on "Close" Visual Basic error 400 [email protected] Excel Discussion (Misc queries) 3 March 19th 08 03:45 PM
Excel crashes after closing workbook James W.[_2_] Excel Programming 1 August 2nd 05 10:09 PM
Excel 2003 crashes when I close any worksheet Greg V Excel Discussion (Misc queries) 0 December 2nd 04 11:25 PM
Excel crashes on close - macro related Bert[_3_] Excel Programming 0 July 23rd 04 01:56 PM
Excel crashes with .Close command Rich[_16_] Excel Programming 1 December 6th 03 03:34 AM


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

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"