+ Reply to Thread
Results 1 to 5 of 5

Excel Close Event.

  1. #1
    Registered User
    Join Date
    10-15-2007
    Posts
    6

    Excel Close Event.

    Hello,
    when the excel closes it closes all the instances of Excel. I am using END with

    Example:
    I have an excel open where i have this close event. (excel 1)

    Now if the open excel this way.
    One way go to the Start button - Microsoft Office - Excel.. (excel 2).
    Now if I close Excel 1 it will not close the Excel 2, which is good.

    The other way of opening the Excel.

    Open the Excel 1 which has the close event in it.

    Now go to windows explorer and double click on the already existing Excel File(MyReport).

    Now if I close Excel 1, myreport is also closing without any message and the customers would be upset if we do this..

    Does any one have any idea what is happening here and what I should do...

    Please suggest me.. Thanks.
    -Regards,
    Venky

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    Case 1: You have an Excel program instance running, and you start a new instance (a separate progam application) of Excel. Closing the first instance does not close the second instance.

    Case 2: You open Excel (a single program instance). When you click on an .XLS file, Windows chooses to open it in a program that is listed as its creator, namely Excel. Windows finds an instance of Excel already running, and so opens the file in that instance. There is only one Excel application running. When it closes, it closes the .XLS file also.

    I don't know if that behavior can be changed.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

  3. #3
    Registered User
    Join Date
    10-15-2007
    Posts
    6
    Thank you so much for your response. You got it 100% correct that is what I want to do. So it is not possible.

    Any other ideas?

  4. #4
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    () You say that one instance of Excel has a "close event". Describe what that is and how it changes the standard close.
    () Why will closing Excel surprise your customers? Won't they expect the report to close if they close Excel?
    () Upload a working example, if possible.

  5. #5
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517
    I am not a VBA expert, (almost exactly the opposite).
    However I would have thought that you could use VBA to intercept an Excel close request and then (at least) send an "OK to close?" query to all the affected instances of Excel running on your computer.

    Mark.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1