none
Excel still runing after closing RRS feed

  • Question

  • Hi everyone,

    I'm facing a problem that happens in every Project (small to large). When I create a Excel addin and start debugging, Excel opens without problems, but when I close Excel, it remains running for about 20 seconds, then close. Sometimes I got "Microsoft Excel has stopped working" error.

    I'm using Visual Studio Enterprise 2015 and Excel 2016.

    Watch the vídeo:

    https://youtu.be/DvU2GBe1nJE

    Is there any way in order to shut down the program immediately?

    • Edited by abfrota Saturday, April 23, 2016 8:33 PM
    Saturday, April 23, 2016 8:28 PM

All replies

  • Hello,

    Do you release all underlying COM objects instantly?

    Use System.Runtime.InteropServices.Marshal.ReleaseComObject to release an Excel object when you have finished using it. Then set a variable to Nothing in Visual Basic (null in C#) to release the reference to the object.

    Also you may find the Why doesn’t Excel quit? article helpful. Note, if you develop an Excel COM add-in there is no need to close the host application programmatically (from your add-in).


    [custom.development]

    Sunday, April 24, 2016 9:33 PM
  • Hi Eugene,

    It is not necessary to create COM objects. The problem happens even if it is a blank project.

    When I use Excel 2013, I have no problems.

    Very strange... Any idea?

    Tuesday, April 26, 2016 1:15 AM
  • Hi abfrota,

    did you mean you have both MsExcel 2013 and 2016 installed on a single machine?

    and when you use Excel 2013 you don't have any issue but when you use 2016 you having an issue.

    did you try to test it with single excel application of 2016?

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 3, 2016 5:39 AM
    Moderator
  • Hi Deepak,

    Thank you for your reply!

    I used to have only Excel 2016 in my machine, but now I have only Excel 2013 because of the problem with 2016.

    I found no solutions on the web.

    Tuesday, May 3, 2016 10:01 PM
  • Hi abfrota,

    did you install any update of Excel ? This can be possible if particular update having bug.

    did you find this behavior of Excel on fresh installation of Excel 2016 or you are using an Excel 2016 and suddenly this issue occur?

    did you try to repair vsto?

    it can be help to solve your issue.

    Regards

    Deepak 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, May 4, 2016 1:49 AM
    Moderator
  • I formated my machine and installed Excel 2016 and available updates using Windows Update.

    I also tried to repair Visual Studio using "add/remove programs", but the problem still happens.

    Tuesday, May 10, 2016 8:21 PM
  • Hi abfrota,

    you have mentioned that you have install an update.

    can I know which update you have installed?

    because you have mentioned that you have formatted the machine then you have also repaired visual studio and you have fresh copy of Excel. after done all these things it should work correctly and not should take more time to close.

    so here I think update can be a issue here. if you know which update you have installed then we can find if that update has some issue with it or any solution is available to solve this issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 11, 2016 7:19 AM
    Moderator