I have an Excel Add-In which uses a worksheet in its workbook to save some preferences data (eg the last used value of a refEdit control on a userform).
I then save the add-in workbook using vba thisworkbook.save
when preferences are changed in the userform.
I have found that this sometimes creates an xlsm file in myDocuments rather than saving the add-in in place (see also a copy of excel add-in is created in my documents after saving).
How can I save the add-in in place (in the add-ins folder) without creating a copy? Note activeworkbook.save
wouldn't work as it saves the open workbook not the add-in.
I could alternatively create a temp file for the preferences but using the sheets in the add-in workbook seems a good place to store data.