Hi Chris,
On the other hand, the function call:
Application.AddIns("Solver Add-in").Installed =
False
has the annoying side effect of popping up an informative
worksheet containing copyright and contact info from the
developer's of the Solver add-in, which changes the
Selection and disrupts the execution of my macro. (I
have the premium solver installed from
http://www.solver.com. Perhaps that's why, but the
problem exists even when I'm set to use the standard
solver as well.)
I've never seen that with standard solver (which is the only version
I've ever used). Maybe the premium version makes some setting that affects
both of them. Wouldn't be the first annoying thing they've done to impede
the programmability of their add-in.
What happens if I just call .Installed = True? Will that
still force the loading of solver.xla, or do I need to
set .Installed = False first to ensure it loads under all
circumstances? If so, then is there an alternative
method of loading solver.xla?
Just setting .Installed = True will only work if the user does not
already have the Solver selected under Tools/Add-ins. If the user does have
Solver selected, Excel will already think it is properly installed an so
..Installed = True will have no effect. The only method other than setting
installed to False/True would be to open the Solver add-in directly using
Workbooks.Open.
Have you tried saving your active sheet and selection, turning off
screenupdating and disabling events before you run the .Installed =
False/True, then restoring everything at the end? I know solver has an
annoying habit of turning screenupdating on whenever it feels like it, but
doing the rest of this should at least minimize its effect on your program.
--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/
* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
"Chris Russell" wrote in message
...