Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Excel automation: how to disconnect correctly?

Hello,
My app hooks up to Excel the following way:
Set moExcelApp = CreateObject("Excel.Application")
Set moExcelWS = moExcelApp.ActiveWorkbook.ActiveSheet
and disconnects from it this way:
Set moExcelWS = Nothing
Set moExcelApp = Nothing

When should I use:
moExcelApp.Application.Quit
?
Under what circuimstances?
Is it really necessary to use it?

Your help appreciated,
Jack


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel automation: how to disconnect correctly?

When should I use:
moExcelApp.Application.Quit


When you want to quit 'your' instance, irrespective as to whether user has
opened their own wb in your moExcelApp or some other reference refers to the
instance. In either case simply 'Set moExcelApp = Nothing' would not close
the app.

I responded to a similar question of yours the other day, not sure if you
saw it.

Regards,
Peter T

"Jack" <replyto@it wrote in message
...
Hello,
My app hooks up to Excel the following way:
Set moExcelApp = CreateObject("Excel.Application")
Set moExcelWS = moExcelApp.ActiveWorkbook.ActiveSheet
and disconnects from it this way:
Set moExcelWS = Nothing
Set moExcelApp = Nothing

When should I use:
moExcelApp.Application.Quit
?
Under what circuimstances?
Is it really necessary to use it?

Your help appreciated,
Jack




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
Pivot Tables disconnect Edi151 Excel Discussion (Misc queries) 1 March 5th 09 04:40 PM
How to disconnect the line for Internet? Eric Excel Discussion (Misc queries) 0 March 7th 08 04:29 AM
Disconnect linked file SLP Excel Discussion (Misc queries) 3 July 5th 07 02:40 PM
Shared Workbook - how to disconnect the pop-up... bondcrash[_28_] Excel Programming 1 June 22nd 06 03:15 PM
How to disconnect when WebQuery done Nathan Gutman Excel Programming 4 December 24th 03 03:31 PM


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

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

About Us

"It's about Microsoft Excel"