Advertisement

12.01.2005 at 07:45AM PST, ID: 21649437
[x]
Attachment Details

Kill Excel Process after user is finished thru VB .NET

Asked by vsshah in Microsoft Visual Basic.Net

Tags: kill, process, excel

Hi,

Using VB .NET 2003 and the PIA for Office XP.

What I'm basically doing is using Excel as a report generator. I have no problem from VB .NET calling Excel, transferring data from the dataset to the desired range, formatting the spreadsheet, etc. The problem lies that I want the user to have my program open (the VB one) and they run the report which opens Excel, transfers data, etc. and they have the opportunity to view it while Excel is up and can print it from there; but after they close Excel to return to the VB program, the instance of Excel still resides Task Manager.

I don't want to save the file like I saw many solutions that save the file and release the Excel object. I really am just using Excel as a report generator...and if the user wants to save it they can use the File>>Save option from Excel to do that.

I need to know how to monitor Excel from VB .NET and "know" when the user closes that particular instance...and then close out the background process from Task Manager.

Thanks for your help!Start Free Trial
[+][-]12.01.2005 at 11:02PM PST, ID: 15402922

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual Basic.Net
Tags: kill, process, excel
Sign Up Now!
Solution Provided By: rahul_a_g
Participating Experts: 1
Solution Grade: C
 
 
[+][-]12.02.2005 at 04:58AM PST, ID: 15404104

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32