Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I try to use SolverOK in a VBA Sub but when I run the Sub I recieved the message: "Solver: an unexpected internal error occured, or avalable memory was exhausted". I am sure that I son't have memory problem. I used the macro recorder to do the task that I wanted to do but when I run the code generated by the macro recorder still I get the same error message. It is crucial to me, I appreciate any help Thank you Reza ) Copy of macro: Sub Macro1() SolverAdd CellRef:="$L$8", Relation:=2, FormulaText:="$K$8" SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$M$8" SolverSolve End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One common problem with Solver is with references. It doesn't provide good
feedback. I believe you are missing the "SetCell" reference. Just personal preference is to use SolverOk first, then the Constraints. Another personal preference is to drop "ValueOf" in a Maximization problem since "ValueOf" is ignored. Here, A1 is your Target cell. SolverOk SetCell:="A1", MaxMinVal:=1, ByChange:="$M$8" SolverAdd CellRef:="$L$8", Relation:=2, FormulaText:="$K$8" SolverSolve HTH Dana DeLouis "Reza" wrote in message ... Hello, I try to use SolverOK in a VBA Sub but when I run the Sub I recieved the message: "Solver: an unexpected internal error occured, or avalable memory was exhausted". I am sure that I son't have memory problem. I used the macro recorder to do the task that I wanted to do but when I run the code generated by the macro recorder still I get the same error message. It is crucial to me, I appreciate any help Thank you Reza ) Copy of macro: Sub Macro1() SolverAdd CellRef:="$L$8", Relation:=2, FormulaText:="$K$8" SolverOk MaxMinVal:=1, ValueOf:="0", ByChange:="$M$8" SolverSolve End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
Solver Error - an unexpected internal error has occurred | Excel Discussion (Misc queries) | |||
WinXP: Solver: An unexpected internal error occurred ... | Excel Programming |