Hello,
I'm writing an MS Excel plug-in with:
- a number of user forms
- a number of worksheets containing data
- a custom control on the ribbon to launch the plug-in
When the user clicks the ribbon control, the application first loads the data on the (hidden) worksheets into dynamic arrays. To do this, I use defined names which refer to the cell or range containing the data.
A greatly simplified example:
This code works like a charm as long as the file is an ordinary workbook (.xlsx). As soon as I convert it to a plug-in (.xlam), Excel throws a run-time error when trying to evaluate the defined name, like so:
Run-time error '13':
Type mismatch
I have no idea what is causing this, and more importantly, no clue on how to solve it.
Any suggestions will therefore be greatly appreciated!
Kind regards!
nymm
PS: Attached to this post is the example file described above. Open it to see the code working as intended. Save and then open it as an .xlam to see it go wrong.
Bookmarks