Jonathan Metzger 12.Jun.12 01:12 PM a Web browser 1-2-39.8Windows 7
123 is frustrating my attempts at code re-use.
Situation: I have ~20 spreadsheets that all need the same code.
I have been unsuccessful using lss or lso, because changes to these included files do not take effect unless you open each report and 're-compile' the code, which makes this approach essentially worthless.
Using an addin called TEST.12A is better, changes to the compiled addin will take effect next time 123 is started.
The problem: each of the ~20 spreadsheets uses a dialog. When I add the statement Use "TEST.12A" in the option section, the dialog will no longer function. I get the message "Variant is not an Object."
TEST.12A was created from a blank spreadsheet and contains a single function called TEST that does absolutely nothing. There are NO DIALOGS within TEST.12A. (I made it a point to not open the dialog editor at any point, because doing so will leave the spreadsheet with a Dialog1 object that you can't get rid of.)
The other spreadsheet contains a single dialog. The only other script code it contains is in the Options:
Option Public
Use "TEST.12A"
And code within the click event of a single button:
Dialog1.Show(0)
This causes the error.
Does mean there is no way to reuse functions using an addin when you have a dialog in the spreadsheet, or I am missing something fundemental?