Solver add-in and macros

T

TomK

I just got a new computer with XP and Excel 2003 and
tried to run a macro that used to SOLVER add-in function
and got a compile error. As a test I recorded a macro
using the SOLVER and got the same result when I tried to
run that macro. The Compile Error is "Sub or Function
not defined". On the Knowledge Base it says I need to
add SOLVER to the list of References in the VB Editor.
When I go to the references list, SOLVER does not
appear. When I open Help for VB and search for SOLVER,
it finds nothing. What is going on? Why doesn't VB even
recognize the existence of SOLVER when it is installed in
Excel?
 
B

Ben Palmer

I had the same problem and I'm trying to remember how I solved it -
you're definitely on the right track. From memory if you browse in
the references window, then select files of type .xla and then
reference the solver add-in, I think that works.

You also need to make sure that you call the correct procedures in the
code (again from memory, I don't think simply recording the macro
necessarily produces correct code in the case of Solver). Look at the
Solver website for info - I think you need to use SetSolver and
SolverSolve, or something like that.

Sorry for being so vague - it's been a while since I did it.

Hope this helps.
 

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