Add-in with Solver Reference Issues

S

Stacy35216

Windows XP, Excel 2003

Hi people,

I'm trying to use Solver in an add-in. I set up a reference as
directed in my book and everything worked fine until I closed Excel and
tried to reopen, at which point I got one of those windows that say that
Excel has experienced a problem and had to close, do you want to send an
error report, etc. Then, since the "Restart Excel" box was clicked, I
got another message after dismissing the first that tells me that the
last time Excel was opened with my add-in enabled, it experienced a
problem and do I want to disable it so Excel will open?
If I disable the add-in, open Excel, then reactivate it, everything
works fine. If I delete the Solver reference, I can close and reopen
Excel as many times as I wish without a problem (of course, some
features of my add-in won't work). Moreover, if I add a reference to
another Excel add-in (analysis toolpak in this case - atpvbaen.xla),
everything works just fine! It's only the Solver reference that messes
up! I am perplexed. If anyone has any light to shed on this issue,
please do!

Thanks,
Allison
 
S

Stacy35216

I figured out I could get around this by adding the reference in the
add-in code instead of manually (though I still don't know why I got
that error). Found this link elsewhere on the help forum:
http://support.microsoft.com/?id=160647
and ran into this error:
http://support.microsoft.com/default.aspx?scid=kb;en-us;282033
but fixed it as directed.

The problem now is that every time I go to open Excel (with my add-in
installed), I get an alert that tells me that the workbook cannot be
closed because it's being referenced. I believe that the customer will
find this to be very annoying. I also find it annoying. I tried to
shut it off by using the Application.DisplayAlerts = false command, but
I think I must be putting it in the wrong place because it won't
suppress the alert. I put it at the head of the procedure that creates
the reference.

Plus, I don't think that when the alert refers to a workbook being
referenced that it's referring to Book1.xls or whatever I just opened,
because that's not what I referenced. I referenced Solver.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top