473,624 Members | 2,191 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

killing or terminating the excel process

86 New Member
dear friends, i am using ms access 2003.

i wanted to export data from access table to excel table.
so i have followed this



Dim db As Database
Dim ea As Excel.Applicati on
Dim rs As Recordset
Dim j As String

Set ea = New Excel.Applicati on
Set db = CurrentDb
ea.Workbooks.Ad d
ea.Visible = True
Set rs = db.OpenRecordse t("SELECT Indicator_Value s.year as yea, Indicator_Value s.[Energy use per $1 GDP (PPP)(converted unit)]as eng FROM Indicator_Value s;")
If rs.RecordCount > 0 Then
rs.GetRows
rs.MoveFirst

For i = 1 To rs.RecordCount
j = rs!Yea
k = rs!eng
ea.ActiveSheet. Cells(i, 1).Value = rs!Yea
ea.ActiveSheet. Cells(i, 2).Value = rs!eng
rs.MoveNext

Next
End If
ea.Workbooks.Cl ose
ea.Quit
Set ea = Nothing



i worked out very well this code. i got what output i want.
but the problem here is even if i close the excel window, i see some excel processes running in the back ground( i viewed it through task manager).

indeed i have closed the excel window with the code

ea.Quit

even then why the excel process still running in the back ground?
how to kill that process?
Jun 2 '07 #1
0 1297

Sign in to post your reply or Sign up for a free account.

Similar topics

8
3715
by: Harlin Seritt | last post by:
I am using os.getpid() to get the pid value for a script running. I store that value (as a string) to a file. Later when I try to kill that pid (i pull this from the file as a string value) I get errors. Using the following lines I get the subsequent error. (pid is a string value) win32api.TerminateProcess(int(pid), 0) OR
0
1443
by: net guest via DotNetMonster.com | last post by:
Hi, i am facing a lot of problems in killing the orphan excel instances. I approached one method like killing the Excel Orphan with processID. I am getting all the Processess that are running currently through System.Diagnostics.Process ,and i am unable to judge the Excel that was created by me only(I have to leave other Excels Untouched).. The another approach WindowHandler is fine with Windows Applications but not working in Web...
3
2004
by: kunal.kewalramani | last post by:
I'm opening an Excel file using ASP.NET, but Excel process remains it is not killed, I tried killing it by using Quit() that is also not working, if anybody have any solution for this please help me out. ********************************************************************** Sent via Fuzzy Software @ http://www.fuzzysoftware.com/ Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
18
3084
by: lgbjr | last post by:
Hi All, I have a VB.NET app that, among other things, writes data to Excel. I am having trouble getting the Excel process to terminate after I quit Excel. I found an article related to this problem: http://support.microsoft.com/default.aspx?scid=kb;en-us;317109 Below is a sample of code that I wrote based on the above article. The excel workbook, worksheets, and all of the cells are properly formatted when Excel
10
8477
by: shiry | last post by:
Hi, I need to do some important cleanup before my console application exists. I used the console ctrl event. This is working well and it fires for all cases, including the CTRL_CLOSE_EVENT (if I close the application from the X botton). But on the contrary to what the MSDN indicates (ms-help://MS.VSCC.2003/MS.MSDNQTR.2003OCT.1033/dllproc/base/handlerroutine.htm), ending my process from the task manager did not fire the CTRL_CLOSE_EVENT....
2
1049
by: jerith.alphonse | last post by:
Hi. I want to write a application in vb. it should kill an application which is running already. Note:- I don want to use this find window funda. ie by catching the window title and terminating can any one help me?
13
3000
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then the process does not end. So I feel confident the problem occurrs here. It appears another reference is created that needs to be closed. Can anyone tell me how to do this? :) Thank you Excel.Workbook workbook =
2
1632
by: abhinav12345 | last post by:
Hi All, I am using Excel.Application object in my code. Now I would like to kill excel.exe created in the task manager. I am using window API function Declare Function GetWindowThreadProcessId Lib "user32.dll" _ (ByVal hWnd As IntPtr, ByRef lpdwProcessId As Integer) As Integer Now I am able to get the process ID of excel.exe when i run this code
0
8234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7158
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.