PC Review


Reply
Thread Tools Rate Thread

Accessing the Solver Add-in in VBA

 
 
BigHairyUglyGuy
Guest
Posts: n/a
 
      8th Apr 2008
Q. I'm trying to run the Solver in Excel via a macro. But as soon as my
code calls a Solver function, I get the message "Sub or Function not
defined". What am I doing wrong?

I found the website www.solver.com which had the following answer in the
FAQ page http://www.solver.com/suppfaqhint.htm

A. You need a reference to the Solver add-in in VBA. First make sure that
you've displayed the Solver Parameters dialog at least once in your Excel
session. Then open the Visual Basic Editor (Alt-F11), select Tools
References, and check the box next to Solver.

That question answers my problem exactly. It does work. The problem is
that I have to do this every time I start a new Excel session. So I'm
looking for a way to set it up so they don't have to do it every time. Any
ideas how to fix it? Would changing the set up in Excel help?

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      8th Apr 2008
I've outlined some alternate approaches on my web site:

http://peltiertech.com/Excel/SolverVBA.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"BigHairyUglyGuy" <(E-Mail Removed)> wrote in
message news:BFA294F3-5DA2-4CC1-A915-(E-Mail Removed)...
> Q. I'm trying to run the Solver in Excel via a macro. But as soon as my
> code calls a Solver function, I get the message "Sub or Function not
> defined". What am I doing wrong?
>
> I found the website www.solver.com which had the following answer in the
> FAQ page http://www.solver.com/suppfaqhint.htm
>
> A. You need a reference to the Solver add-in in VBA. First make sure
> that
> you've displayed the Solver Parameters dialog at least once in your Excel
> session. Then open the Visual Basic Editor (Alt-F11), select Tools
> References, and check the box next to Solver.
>
> That question answers my problem exactly. It does work. The problem is
> that I have to do this every time I start a new Excel session. So I'm
> looking for a way to set it up so they don't have to do it every time.
> Any
> ideas how to fix it? Would changing the set up in Excel help?
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
solver question: educational premium solver wonka Microsoft Excel Discussion 3 4th May 2009 03:46 AM
referencing Solver.xlam vs. Solver.xla - 2007 vs. 2003 =?Utf-8?B?RHVrZSBDYXJleQ==?= Microsoft Excel Programming 3 20th Nov 2007 03:48 PM
Interesting Solver problem (Solver encounters an error) MrShorty Microsoft Excel Misc 3 22nd Dec 2005 10:52 PM
Accessing solver in XL2003 from vb =?Utf-8?B?cm9zc3U=?= Microsoft Excel Programming 0 23rd Feb 2005 03:41 PM
Resetting Solver Manually to Fix Solver Bug Stratuser Microsoft Excel Programming 0 13th Sep 2004 07:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:46 PM.