Closing Addins

If you have just converted a workbook to an Add-in by changing its IsAddin property and saving it, or you have loaded the Add-in using Open, there is no obvious way to close the file from the menus without closing Excel. One way to close the Add-in is to go to the Immediate window and type in code that uses the Close method, treating the Add-in as a member of the Workbooks collection:

Workbooks("AddIn.xlsm").Close

Add-ins do not have an Index property value in the Workbooks collection and are not included in the Count property of the Workbooks collection, but they can be addressed by name as members of the Workbooks collection.

Another method you can use to close an Add-in is to click the filename in the Recent Documents list while holding down Shift. You may get a message about overwriting the copy in memory (depending on whether or not it has changed), and then you will get a message about not being able to open an Add-in for editing (a hangover from previous versions). Click OK and the Add-in will be removed from memory.

0 0

Post a comment