none
Install or Upgrade excel add-in not asking to close any open Excel files RRS feed

  • Question

  • Hello, everyone.

    Could you tell me, is it possible to Install or Upgrade excel add-in not asking to close any open Excel files?

    Is it possible to use the just installed add-in in not closed excel instances?

    Thank you,

    Andrey.

    Thursday, September 11, 2014 2:34 PM

Answers

  • That is a really strange question...

    What is the reasoning for that? Can you elaborate? 

    AFAIK you have to restart any other Excel instances before being able to use a freshly installed add-in...

    you may try going onto the develop tab and then check if you can enable the add-in there (if it even exists in the list) but I doubt thats possible

    Thursday, September 11, 2014 2:39 PM
  • Nope.

    In theory, you can find the add-in in the COMAddins collection and set the Connect property of your add-in to false to get it unloaded. Then you can update files and try to set the Connect property anew.

    Thursday, September 11, 2014 2:59 PM

All replies

  • That is a really strange question...

    What is the reasoning for that? Can you elaborate? 

    AFAIK you have to restart any other Excel instances before being able to use a freshly installed add-in...

    you may try going onto the develop tab and then check if you can enable the add-in there (if it even exists in the list) but I doubt thats possible

    Thursday, September 11, 2014 2:39 PM
  • Nope.

    In theory, you can find the add-in in the COMAddins collection and set the Connect property of your add-in to false to get it unloaded. Then you can update files and try to set the Connect property anew.

    Thursday, September 11, 2014 2:59 PM
  • Hi Andrey,
     
    If you set the read-only attribute of the xla(m) file in Explorer you can
    simply replace the file regardless whether anyone has the file open in Excel.
     
    You might be able to ping the file location to check for a timestamp in order
    to check for a change in version, but you would have to re-open the file.
     
    One way is to have a small macro in the file you can call using the
    Application.Ontime method:
     
    Sub CloseMeAndScheduleReOpen()
        Application.OnTime, Now(),"'" & ThisWorkbook.FullName & "'!ReOpen"
        ThisWorkbook.Close False
    End Sub
     
    Sub ReOpen()
        'Only code to handle the version change is needed here
    End Sub
     
    The only disadvantage to this is that the users will be shown the enable macro
    dialog when the Ontime method re-opens the add-in (unless you've placed it in a
    trusted folder).
     
     

    Regards, Jan Karel Pieterse|Excel MVP|http://www.jkp-ads.com
    Thursday, September 11, 2014 4:17 PM