hi all have the following code and as usual can't figure out where the problem is. getting compile error sub or function not defined. any help appreciated.
Regards
Dan
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("J14").Value = "y" Then
Call Freeme
End If
End Sub
Sub Freeme()
SolverReset
SolverOk SetCell:="$N$32", _
MaxMinVal:=2, _
ValueOf:=0, _
ByChange:="$G$22:$L$22", _
Engine:=1, _
EngineDesc:="GRG Nonlinear"
SolverAdd CellRef:=Range("$G$22:$L$22"), Relation:=1, FormulaText:="20"
SolverAdd CellRef:=Range("$G$22:$L$22"), Relation:=3, FormulaText:="2"
SolverAdd CellRef:=Range("$M$15:$M$22"), Relation:=3, FormulaText:="0"
SolverSolve
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1
End Sub
Bookmarks