Using Excel Solver in VBA

A

Antoine Cellerier

Hello,

I'm trying to use this simple code in Excel VBA:
SolverReset
SolverOk SetCell:="$A$13", MaxMinVal:=2, ValueOf:="0", ByChange:="$A$7"
SolverSolve

Unfortunately it seems that these functions aren't known. So i browsed
the web a little and found out that i needed to activate the Solver in
"Tools->References...". I couldn't find it in the list so i clicked
"Browse" and selected SOLVER32.dll in F:\Program Files\Microsoft
Office\OFFICE11\Library\SOLVER . Unfortunately that doesn't work (i get
a "Can't add a reference to the specified file" error message.

This is using Excel 2003 3 month trial. The solver works fine in Excel,
it's just the VBA part that i can't get to work.

Many thanks for your help,
 
A

Antoine Cellerier

Hum, that's weird. Using the Browse button didn't work but it added a
"SOLVER" item in the list, which can be loaded. The weird part is that
it still doesn't work using Browse ...

Anyways .... it should work now.
 

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