OLE: Excel.Application

Hello,

in VB.Net, I use Excel to display results :

dim xl as new Excel.Application // creates an Excel process
// snip (putting values into cells)
xl.Visible = true

If the user closes the Excel file and then my program,
the Excel process is killed in memory, which is good.

If the user closes my program first and then the Excel file,
the Excel process remains in memory !

How can I make sure the process will be killed ?

Thanks !



0
8/10/2006 11:11:07 AM
excel 39879 articles. 2 followers. Follow

2 Replies
843 Views

Similar Articles

[PageSpeed] 56

Hi

You need to set
xl.quit
(and before that ensure that excel doesn't halt and ask things like "save 
changes?" on quitting) somewhere in your program, in the unload event of 
your main form or something.

HTH. best wishes Harald

"myname" <nospam@ihatespam.com> skrev i melding 
news:44db1198$1@news.sncf.fr...
> Hello,
>
> in VB.Net, I use Excel to display results :
>
> dim xl as new Excel.Application // creates an Excel process
> // snip (putting values into cells)
> xl.Visible = true
>
> If the user closes the Excel file and then my program,
> the Excel process is killed in memory, which is good.
>
> If the user closes my program first and then the Excel file,
> the Excel process remains in memory !
>
> How can I make sure the process will be killed ?
>
> Thanks !
>
>
> 


0
stf (176)
8/10/2006 12:25:35 PM
I have used KILL.exe in order to deal with this before.

-Aaron


myname wrote:
> Hello,
>
> in VB.Net, I use Excel to display results :
>
> dim xl as new Excel.Application // creates an Excel process
> // snip (putting values into cells)
> xl.Visible = true
>
> If the user closes the Excel file and then my program,
> the Excel process is killed in memory, which is good.
>
> If the user closes my program first and then the Excel file,
> the Excel process remains in memory !
> 
> How can I make sure the process will be killed ?
> 
> Thanks !

0
dbahooker (137)
8/11/2006 1:33:07 AM
Reply:

Similar Artilces:

how do I create qif files from Excel for import into Quicken?
Want to import a bunch of financial data that's in Excel into Quicken. Can I create a QIF file from Excel? You'll need a converter utility for this. Here's a google search that might help: http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLD,GGLD:2004-31,GGLD:en&q=convert+excel+to+quicken tj "pb" wrote: > Want to import a bunch of financial data that's in Excel into Quicken. > Can I create a QIF file from Excel? Hi *pb*, See if http://xl2qif.chez.tiscali.fr/xl2qif_en.php suits your purpose. Don't forget to back up the folde...

Difficult Excel Question
I am doing a VLOOKUP, but when you select the sheet you wish to look at, I would like the name to chance depending on a name supplied by a cell. If anyone can solve this, please e-mail me rthakrar49@hotmail.com =VLOOKUP(A1,INDIRECT("'"&A2&"'!A1:H100"),3,FALSE) -- HTH RP (remove nothere from the email address if mailing direct) "rthakrar49@hotmail.com" <rthakrar49@hotmail.com@discussions.microsoft.com> wrote in message news:8BDA5D08-0AD1-43D2-A572-58900081D412@microsoft.com... > I am doing a VLOOKUP, but when you select the sheet ...

Excel Tool Bars
Lately, when I open Excel, the top Excel name bar and the bottom tool bar are not on the screen. It appears that the worksheet is too large to be contained on the screen. Hi Bailey, Can't tell from your description, so just trying to grasp at straws.. -- are the toolbars floating, if so drag to correct position so the become docked Applies to toolbars but not the name box and address bar. -- do you have problems in other applications, i.e. Display settings, screen resolutions -- is the zoom control at 100% -- What happens in Full Screen mode and in restore (buttons upper right...

using excel from dotnet
situation: I'm working on a new app in vbexpress 2008 using acad com interop Also need to write extracted data to excel. problem: At home(laptop) i have excel 10. At the office excel 12. (both seem to have excel5 listed in refs.) I need to work at both locations. can i reference both 10 and 12 in the same vbproj (i think not) can i just reference 5 and is that just an older version with common (but not the latest) interface? i guess i can just have 2 vbproj files (one on laptop one at work) and just copy the .vb class files that are being edited back and forth, not cop...

Remove a document from a workspace in Excel 2007
I have a user who created a workspace and included a file that he now wants to remove from the workspace. Is there a way to remove one file from a workspace? Thank you. ...

Can I use Free Excel Viewer 97/2000 in Windows XP?
Microsoft downloads doesn't list the free excel viewer compatible with Windows XP. Is there a free download to view and print excel spreadsheets, that's compatible with Windows XP? Linda The Viewer for Office 97/2000 works fine under Windows XP. Gord Dibben Excel MVP On Fri, 22 Oct 2004 15:11:01 -0700, "Linda" <Linda@discussions.microsoft.com> wrote: >Microsoft downloads doesn't list the free excel viewer compatible with >Windows XP. Is there a free download to view and print excel spreadsheets, >that's compatible with Windows XP? Linda An...

Excel 2000/2003 conflict
Whenever I try to open excel files created using 2000, 2003 gives me errors on simple formulas. For example, a SUM formula is marked as an error and displays a wrong number, when I go up to the formula bar and hit enter without changing the conents it recalculates to the right answer. There is many more errors such as "inconsistent formula" or "lost visual basic project" which doesn't allow a 2000 file open without repair. Is there anything I can download to fix all of this together or will I have to fix them all by hand? Does this have to do anything with the differen...

sync between outlook crm & vertical applications
I would like to ask if there is any way to make synchronization & work offline with outlook client & view new entities that were created in a vertical application ? I would like to get into the outlook client the new information in addition to the current entities ? For example. We developed new form using the CRM SDK & We would like to view this information through the outlook client when working offline . Can We intervene the synchronization process for our needs ? As you have probably guess customizations created using the CRM SDK can only be viewed in the Outlook client when ...

Unable to run excel macro after changing file name
After changing the filename in an excel macro, receiving Error number 5 - Invalid procedure call or argument when users with excel 2000 run the macro. Users with excel 2003 are not having this issue Post the line of code that is causing the error. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "merf" <merf@discussions.microsoft.com> wrote in message news:F68DF323-214D-4F01-8D8E-654F9500242E@microsoft.com... > After changing the filename in an excel macro, receiving Error > number 5 - > Invalid procedure cal...

compare information from two spreadsheets or excel sheets
Don't know if any one can help, I am trying to find an easy way to compare data from one spread sheet to another on Excel 2000. Every week I create a spreadsheet and need to find out if any further items added on it. example old spreadsheet would be called Andrews 19.04.2010 with 3 sheets 4 columns on each. The new one would be Andrews 26.04.2010 same set up again but possibley new items on the Andrews 26.04.2010 Add a fifth corresponding column on the NEW sheet and insert the following formula in the first cell: =SUMPRODUCT((OldSheet!A:A=A1)*(OldSheet!B:B=B1)*(OldShee...

Seam-Excel error when exporting file
When I export an excel file from a website the file exports with the file name of 'seam-excel' and I can't format the cells or create a pivot table without saving and re-naming the file. How can I get my file to not export with that file name? Is it a security setting? Have never heard of this problem being generated through Excel alone. I would suggest the source would be at the website from which you are exporting. Can you post a URL? I'd like to have a look just out of curiosity. Gord Dibben MS Excel MVP On Fri, 12 Feb 2010 12:41:01 -0800, fallou...

Installing components for Microsoft Excel XP
I Need Help. I recently demoted my PDC to a standard server and joined another domain. Now when I attempt to access Excel I receive the following: =========================================== "Installing components for Microsoft Excel" Installing: "Microsoft Excel Feature" =========================================== It runs and then goes away but it does this every time I open Excel. How do I get rid of this message. I really don't want to re-install Excel. Things I have done. 1. Copied the old user's profile to the new one. 2. Move the Application Data...

Create/Update Excel Objects in Power Point
I developed an add-in in Power Point 97, 2000, XP and 2003 for creating Excel charts/tables and being able to update them. The code I used is below: Dim PPT_CHRT As OLEFormat Dim PPT_SLD As Slide 'ADD a chart/table PPT_SLD.Shapes.AddOLEObject Left:=var_chrt_L, Top:=var_chrt_T, Width:=var_chrt_W, Height:=var_chrt_H, ClassName:="Excel.Chart.8", Link:=msoFalse Set PPT_CHRT = PPT_SLD.Shapes(var_SHP_count_no).OLEFormat PPT_SLD.Shapes(var_SHP_count_no).Select 'EDIT chart/table Set PPT_SLD = ActivePresentation.Slides(var_SHP_SLD_no) Set PPT_CHRT...

Comparing two excel files
I work with large data in excel. Most of the time I need to match two different worksheets. Both worksheets always have two columns that contains same data (name & ID). What would be the best way to match names and ID to obtain a new file with data that couldn't match? if Excel good to do that or should I use other software like Access? please advise. Look at Chip Pearson's page on working with Duplicates and Uniques http://www.cpearson.com/excel/duplicat.htm -- Regards, Tom Ogilvy Alexandra <anonymous@discussions.microsoft.com> wrote in message news:1091601c3f335$a...

Change listbox text size in Excel 2007
Using data validation list box function to display a named range, How can the text size be increased when displayed in the list box, How can the number of records displayed be increased from the default This can not be done. See link for further detail and possible workarounds: http://www.contextures.com/xlDataVal08.html#Font -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Maxwell Crompton" wrote: > Using data validation list box function to display a named range, > How can the text size be increased when displayed in ...

How do I create a hyperlink to a web page in Excel?
How do I create a hyperlink to a web page in Excel? I click on Insert/Hyperlink. Click the on the "Browse the Web" button and slect a web site. After creating the hyperlink, I am unable to open the hyperlink. I get a error message box saying, "Unable to open. Unable to locate Internet server or Proxy server". Try copying the webpage address and pasting it into a cell. With the cell selected, press F2 and Enter and it will create the hyperlink for you. HTH -- Sincerely, Michael Colvin "Olowalu" wrote: > How do I create a hyperlink to a web page i...

my first excel experience (share portfolio)
hi guys although i have had excel on my laptop for years this is the first time i have ventured to use it. i am trying to do a stock /share portfolio, so i can tell at a glance my positions, so far the layout as follows:- a6 buy/sell, input b6 amount buy,input c6 amount sell,input d6 name stock/share,input e6 epic code,input f6 buy date,input g6 sell date,input h6 purchase price per share,(bid)input i6 sell price per share,input j6 sub total [=h6*b6],calc k6 buy commission �,input l6 sell commission �,input m6 stamp duty tax,=((h6/100)*b6)*/0.5 ,calc n6 total co...

copy scanned documents to excel
Hello, please help, I recieve a lot of documents in paper and I need to input them to excel, i scann them with imaging but it comes out single columned and that doesnt work for me, what can i do? Have tried the Text to Column command, under Data? It's function is to split up data in such situations. If you're not familiar with it, try following the Text to Column wizard (the screen that appears when you use Text to Column). "Malu" <Malu@discussions.microsoft.com> wrote in message news:42B2C174-B169-4BC1-9522-8EA78E0AE9BD@microsoft.com... > Hello, please hel...

Toolbars in Excel 2003
I have a custom Toolbar which is now not required. Despite deleting it using View Toolbars Customize Delete and then saving the file when I close Excel and re-open the file it was located in the Toolbar reappears. What am I maissing You may want to check to see if there's an addin that adds the toolbar. Tools|Addins keep track of the ones you toggle off/on when you're testing. Or maybe you have an addin in your XLStart folder that's doing the work. Close excel and windows start button|search (for XLStart) Move files out of that folder and test to see if you can find the probl...

How can I convert an Excel file to an address book?
How can I convert an Excel file to an address book to import into email? ...

Export to Excel
I would like to export my entire database to CSV/Excel to fix and correct/update and then import it back to the database. How can I export the database to CSV or Excel format ? Thanks DON HI Donwatana, You can do so but remember the limition of Excel, like you can't create or export more than 255 tables in one excel sheet, second the rows which are 65,536 somthing like that. so make sure you don't have so much data. Go to Enterprise manager in your sql server (if you not have download small admin tool available on interenet for SQL Admin name) and then go to your database rig...

Create a flat file in Excel
I need to create a flat file in Excel using the pipe delimiter | as element, and carriage return line feed as line delimiter. How do I do this? You could change the windows list separator (in the regional settings applet in the control panel) to the vertical bar (just temporarily). Then save the file as a delimited file. Or maybe you could create a formula in another cell: =a1&"|"&b1&"|"&c1&.... And drag down. Then copy that column and paste into notepad and save the file from notepad. GF08 wrote: > > I need to create a...

Excel Services Cannot refresh
My configuration is a 2 server system. Server A running Sharepoint + all services. Server B running SQL 2005. I created a report lib and added it to the trusted file location. I added a trusted data connection lib. Exported my ..odc files to the location. ( the system is configured to allow eithor embedded file or .odc file from the lib). I am using windows auth, I am trying this with both my personal and a farm admin account. I can open the files via the browser however the data is not current. The data is from the last publish. When I try to refresh current or all, i ge...

Excel Queries
Anyone done any Data Queries in Excel against GP? I've wrote several in Excel going against Access, AS400 & others & now considering the GP database. Just looking for any advice or warnings. FRx is not pulling the desired data that I know is in GP Thanks Hi Merle, What specific fields in GL are you trying to show in FRx? We may able to work around on this within FRx. Another approach is to use GP Smarltist to extract the same information in Excel and use the 'Link to External Worksheet' in FRx. Cheers, Dennis Araullo, MACS Microsoft Certified...

How can zero be displayed in Excel as the first number
Kevin Wrote: > Hi Kevin Either format the cell as Text or enter '0???, beware the numbers cannot then be used in calculations -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24783 View this thread: http://www.excelforum.com/showthread.php?threadid=400192 ...