Use Excel-DNA for single workbook

Sep 3, 2013 at 2:51 PM
I understand the concept of using the XLL as an addin but is it possible to restrict the use of the addin to a single workbook only? For instance, I want to create an .xlsm template that effectively looks like a control panel so the addin will ONLY work with this file.

Is that possible and/or can you suggest any links?

Thanks
Q
Coordinator
Sep 5, 2013 at 7:08 PM
Hi,

The best I can suggest is that your add-in checks for whether the active workbook is the one it's supposed to work with. You'd need to handle some of the Application's events to keep track of changes to the active workbook, then disable your UI or whetever.

-Govert