Reputation: 2950
So I have an excel add-in that, amongst other things, contains a huge list of aliases. For example, Country names with their ISO codes, Countries with their continents, etc etc (so that I can easily know that Canada is in America or that Côte D'Ivoire's national language is French, etc). Currently, I have the xlam with all the relevant functions that check named ranges in another workbook.
So summarizing, I have 2 files:
my_functions.xlam (has the functions that I can call from excel to get the Alias name). An example function is:
Function nti(v) nti = WorksheetFunction.VLookup(Trim(v), Range("macros.xls!nti"), 2, 0) End Function
Where nti is the function that I use and macros.xls!nti is the named range that I am referencing.
This all works great, but that means that this functionality requires two files, since an .xlam file can not be opened and edited in excel, only in VBA explorer.
Question: How can I have an easily modifiable lists and functions referring to these lists in one file? The functions should be available to other files I'm working on.
Disqualified solutions:
Thanks in advance!
Upvotes: 0
Views: 1520
Reputation: 23530
I usually just toggle the IsAddin property of the XLAM from true to false, edit the worksheet and then toggle the property back again before saving.
Upvotes: 2