Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2004, 03:44 PM
MG MG is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel 2000 Runtime Does Not Unload

I'm hoping someone can help here. I've been working on a project that requires data exports to Excel spreadsheets. I've done this successfully in InterDev w/a COM component built in VB6, and have migrated both the webpage and COM into VS.Net. The problem is that when the code is finished, Excel.EXE is still running - despite calling the Quit() method.

I am using Excel 2000 right now and have not updated to Office 2003 as of yet. This simple code example causes this:

Private Sub RunExcelCheck()

   Dim objExcel As New Excel.Application()

   System.Threading.Thread.Sleep(10000) 'So I can see the .exe file running

   objExcel.Quit()
   objExcel = Nothing

End Sub

Help! This is the last piece to a successful migration!

MG
 
Old January 5th, 2004, 06:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 344
Thanks: 0
Thanked 1 Time in 1 Post
Default

Try changing the line :

objExcel = Nothing

to :

set objExcel = Nothing

This is the only difference I could see between it and the MS descriptions.
 
Old January 5th, 2004, 06:24 PM
MG MG is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Set objExcel = Nothing does not work in VB.Net code - the "Set" is implied.

Thanks anyway!

MG
 
Old January 6th, 2004, 02:47 PM
MG MG is offline
Registered User
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found the answer:

http://support.microsoft.com/default...b;EN-US;317109

It works but now I have to find the offending object which is buried
in code. Oh happy joy joy.

MG





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
HELP - Access 2000 Runtime w Windows XP Compiled.. chasidim Access 2 April 3rd, 2006 11:06 AM
Excel 2000 vs Excel 2002 Macro Issue williadn Excel VBA 1 July 14th, 2005 09:09 AM
Excel Unload m_soeb General .NET 1 June 4th, 2004 04:25 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.