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

Hello I am having a problem closing excel (from the Process List) when I am
done using the Spreadsheet.

The code below works, however, when the application first starts, before I
create the Excel Object in code, the reference from the designer creates an
Excel.exe in the process list that never gets destroyed. I even tried
running the Garbage Collector, which still did not remove the process.

Any Suggestions are greatly appreciated,

Chuck

[code]

Excel = New Excel.Application
with Excel

..Application.DisplayAlerts = False
..ActiveWorkbook().SaveAs(TheSaveLocation,
..ActiveWorkbook.FileFormat.xlCSVWindows) ', TheFormat)
..ActiveWorkbook.Close()
..Quit()

End With

System.Runtime.InteropServices.Marshal.ReleaseComO bject(Excel)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Closing Excel

Try Application.Quit

"Charles A. Lackman" wrote:

Hello I am having a problem closing excel (from the Process List) when I am
done using the Spreadsheet.

The code below works, however, when the application first starts, before I
create the Excel Object in code, the reference from the designer creates an
Excel.exe in the process list that never gets destroyed. I even tried
running the Garbage Collector, which still did not remove the process.

Any Suggestions are greatly appreciated,

Chuck

[code]

Excel = New Excel.Application
with Excel

..Application.DisplayAlerts = False
..ActiveWorkbook().SaveAs(TheSaveLocation,
..ActiveWorkbook.FileFormat.xlCSVWindows) ', TheFormat)
..ActiveWorkbook.Close()
..Quit()

End With

System.Runtime.InteropServices.Marshal.ReleaseComO bject(Excel)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Closing Excel

Hello,

I do not have an Application.Quit. However, in the code I showed below
"Excel" is the application and I am calling Quit.

Chuck


"JLGWhiz" wrote in message
...
Try Application.Quit

"Charles A. Lackman" wrote:

Hello I am having a problem closing excel (from the Process List) when I
am
done using the Spreadsheet.

The code below works, however, when the application first starts, before I
create the Excel Object in code, the reference from the designer creates
an
Excel.exe in the process list that never gets destroyed. I even tried
running the Garbage Collector, which still did not remove the process.

Any Suggestions are greatly appreciated,

Chuck

[code]

Excel = New Excel.Application
with Excel

..Application.DisplayAlerts = False
..ActiveWorkbook().SaveAs(TheSaveLocation,
..ActiveWorkbook.FileFormat.xlCSVWindows) ', TheFormat)
..ActiveWorkbook.Close()
..Quit()

End With

System.Runtime.InteropServices.Marshal.ReleaseComO bject(Excel)





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Closing Excel

I don't know what to tell you. Excel recognizes Application.Quit as the
command to shut down that instance of Excel. If you can't use that command
in your software, then you will probably have to close it manually.

"Charles A. Lackman" wrote:

Hello,

I do not have an Application.Quit. However, in the code I showed below
"Excel" is the application and I am calling Quit.

Chuck


"JLGWhiz" wrote in message
...
Try Application.Quit

"Charles A. Lackman" wrote:

Hello I am having a problem closing excel (from the Process List) when I
am
done using the Spreadsheet.

The code below works, however, when the application first starts, before I
create the Excel Object in code, the reference from the designer creates
an
Excel.exe in the process list that never gets destroyed. I even tried
running the Garbage Collector, which still did not remove the process.

Any Suggestions are greatly appreciated,

Chuck

[code]

Excel = New Excel.Application
with Excel

..Application.DisplayAlerts = False
..ActiveWorkbook().SaveAs(TheSaveLocation,
..ActiveWorkbook.FileFormat.xlCSVWindows) ', TheFormat)
..ActiveWorkbook.Close()
..Quit()

End With

System.Runtime.InteropServices.Marshal.ReleaseComO bject(Excel)






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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Closing Excel within itself Jan Karel Pieterse Excel Programming 0 February 11th 05 07:01 AM
Closing VB triggers closing Excel Minilek Excel Programming 2 August 6th 04 05:17 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM
Closing Excel Phil Excel Programming 2 October 29th 03 09:43 PM


All times are GMT +1. The time now is 10:28 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"