ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add-in with Solver Reference Issues (https://www.excelbanter.com/excel-programming/346958-add-solver-reference-issues.html)

Stacy35216[_10_]

Add-in with Solver Reference Issues
 

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


--
Stacy35216
------------------------------------------------------------------------
Stacy35216's Profile: http://www.excelforum.com/member.php...o&userid=15952
View this thread: http://www.excelforum.com/showthread...hreadid=489495


Stacy35216[_11_]

Add-in with Solver Reference Issues
 

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...b;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.


--
Stacy35216
------------------------------------------------------------------------
Stacy35216's Profile: http://www.excelforum.com/member.php...o&userid=15952
View this thread: http://www.excelforum.com/showthread...hreadid=489495



All times are GMT +1. The time now is 12:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com