How do I Use Solver with the Macro Recoder/VBA

G

Guest

Sub Macro4()
'
' Macro4 Macro
' Macro recorded 7/14/2007 by John Reed
'

SolverReset
SolverOk SetCell:="$BR$58", MaxMinVal:=1, ValueOf:="0", ByChange:= _
"$BL$11:$BL$58"
SolverSolve
End Sub

When I try to run the macro I receive the following error, "Sub or Function
Not defined".

Following the directions in help, I go to the tools, reference and the lib
and all that is in the lirruary is a dll and it does not allow me to open.

What I want to do is have a VBA routine that calls Solver, Set the cell, and
the bychang:= My Range Variable

Thanks for the help in advance
 
G

Gord Dibben

From Help.........

To set a reference to an application's type library
Click References on the Tools menu.
Select the check boxes for the applications with type libraries you want to
reference.


So...........In Tools>References scroll down to "SOLVER" and checkmark it.


Gord Dibben MS Excel MVP
 

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