View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Addin loads but functions don't work

in your beforeclose event, you can change all you formula to text strings.

(pseudocode)
Cells.Replace What:="=", With:="ZZZ="

then save the workbook.

on opening, in the workbook_Open event, load the addin, then convert the
formulas back.

The downside is that this forces a save of the workbook whether the users
want to save or not - so you might include a prompt.

--
Regards,
Tom Ogilvy

"KitenutDave" wrote in message
...
I have a spreadsheet that has a number of calls to functions that are
contained in an add-in. My users start up the spreadsheet by browsing to

the
directory and double-clicking the .xls file. They fill in financial
information, then save the file under a different name. So the original

file
is really just a read-only template. What I want to happen is that

whenever
they open the template file, or any of the modified files, it will check

to
see if the addin is loaded and, if not, load it. For various reasons I

don't
really want the add-in loaded permanently; just when one of these
spreadsheets is opened.

I've tried putting the code in the workbook_open event of the spreadsheet
that seems to load the add-in when necessary, but the functions still

don't
work (#Name). It works fine if I load the add-in first, then open the
spreadsheet, but this is not agreeable to my users.

Any ideas? Is there a different event that I should use? Or perhaps a
different strategy altogether?