Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to Kill Excel application process

I porgramming under Visual Basic 6 and Visual Studio .NET 2003, using Win XP.
I have a next problem. After i close my soft., then i cannot run excel
corretly - the center part of the excel is not visible. A create a code like
this:

1. Create a reference
2. Inicialize excel app from visual basic:
Dim ExcelApp As New Excel.Application
Dim ExcelWB As Excel.Workbook = ExcelApp.Workbooks.Add
Dim ESheet As Excel.Worksheet = ExcelWB.Worksheets(1)

3. Do with ESheet what i need
4. Try to kill excel application:
ExcelWB.Close()
ExcelApp.Quit()

ESheet = Nothing
ExcelWB = Nothing
ExcelApp = Nothing

But if i after this run excel with directly clicking on excel sheet on
desktop, the excel don't run correctly.

Thank you for your help, and sorry my english.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default How to Kill Excel application process

HoGo,
If this is VB6, you will not be able to compile in the first place as:
Dim ExcelWB As Excel.Workbook = ExcelApp.Workbooks.Add
is not valid.
You need:
Dim ExcelWB As Excel.Workbook
Set ExcelWB = ExcelApp.Workbooks.Add

If this is not VB6, I can't help you much.

NickHk


"HoGo" wrote in message
...
I porgramming under Visual Basic 6 and Visual Studio .NET 2003, using Win

XP.
I have a next problem. After i close my soft., then i cannot run excel
corretly - the center part of the excel is not visible. A create a code

like
this:

1. Create a reference
2. Inicialize excel app from visual basic:
Dim ExcelApp As New Excel.Application
Dim ExcelWB As Excel.Workbook = ExcelApp.Workbooks.Add
Dim ESheet As Excel.Worksheet = ExcelWB.Worksheets(1)

3. Do with ESheet what i need
4. Try to kill excel application:
ExcelWB.Close()
ExcelApp.Quit()

ESheet = Nothing
ExcelWB = Nothing
ExcelApp = Nothing

But if i after this run excel with directly clicking on excel sheet on
desktop, the excel don't run correctly.

Thank you for your help, and sorry my english.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default How to Kill Excel application process

Hi

Put
ExcelApp.Visible = True
early on for testing purposes. Because Excel may ask you things, like "save
changes ?" and if you don't see or reply then she won't close properly.
Which would be a problem at least he
ExcelWB.Close()
ExcelApp.Quit()

Please clarify "excel don't run correctly"

HTH. Best wishes Harald

"HoGo" skrev i melding
...
I porgramming under Visual Basic 6 and Visual Studio .NET 2003, using Win

XP.
I have a next problem. After i close my soft., then i cannot run excel
corretly - the center part of the excel is not visible. A create a code

like
this:

1. Create a reference
2. Inicialize excel app from visual basic:
Dim ExcelApp As New Excel.Application
Dim ExcelWB As Excel.Workbook = ExcelApp.Workbooks.Add
Dim ESheet As Excel.Worksheet = ExcelWB.Worksheets(1)

3. Do with ESheet what i need
4. Try to kill excel application:
ExcelWB.Close()
ExcelApp.Quit()

ESheet = Nothing
ExcelWB = Nothing
ExcelApp = Nothing

But if i after this run excel with directly clicking on excel sheet on
desktop, the excel don't run correctly.

Thank you for your help, and sorry my english.



Reply
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
Mail merge issue - ghost Excel process remains after closing application d_b Excel Programming 1 August 16th 04 02:29 PM
Mail merge issue - ghost Excel process remains after closing application d_b Excel Programming 0 August 16th 04 01:12 AM
Quit Method do not kill excel process Rui Oliveira Excel Programming 2 January 16th 04 09:38 AM
Quit Method do not kill excel process Rui Oliveira Excel Programming 0 January 15th 04 04:51 PM
to kill a excel process han keat Excel Programming 1 July 18th 03 07:32 AM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"