I've developed a rather intensive Excel Addin (VTSO based) that creates an in-memory datatable from database query, and then binds this to ListObject. There are a bunch of other functions available when this ListObject is created (including event handlers that update calculations in the datatable, and custom task panes that popout to show additional information about a cell).
The Addin works well, although I'm getting issues when users open other Excel workbooks or additional instances of Excel to multi-task on work.
What's the best way to manage the state of this particular application? Users should only ever work on one copy of this workbook at a time, however the flexibility of Excel makes it difficult to manage.
How do others manage this? I was thinking of creating a GUID when a workbook is created, and then testing for this whenever code is called to make sure that the active workbook is the correct workbook. Or is there a better way?