I suppose I'm less surprised at this. The variable belongs to the add-in,
not the spreadsheet, and there's only one add-in. Any persistent data there
could be expected to be about the state of the add-in itself.
There would be lots of ways to keep information specific to each workbook,
so you need to think about what you need to hold before you look at a
solution. I'm assuming that your I is simply a test, so step back and
define the problem before you define the solution.
Specifically, what persistent data should an add-in hold for a spreadsheet
anyway? The normal answer should be: "none". So, think about everything
you're looking at holding and where you should hold it.
Seeing it's Excel, most persistent data should be held in the sheet itself.
This will sometimes be as real information in cells, sometimes as positional
information (e.g. selected cell, active worksheet, etc), and sometimes as
derived information (e.g. first free cell in a column).
If your sheet interacts directly with your add-in (for instance through a
toolbar), then the sheet should be supplying everything the add-in needs.
If your sheet interacts with your add-in via VBA code in the workbook (for
instance as service functions) then any persistent data that the sheet
doesn't have should be in the local VBA, not the add-in.
That's the theory. Practice might be different. Have a look at the data
you need to hold. Eliminate anything that can be held as described above,
then by all means come back with questions about specific types of data that
the add-in needs to hold, and we'll throw some suggestions your way.