Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Solver: an unexpected internal error occured, ...

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Solver: an unexpected internal error occured, ...

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 1 February 12th 09 03:18 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 02:35 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 02:19 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 02:19 AM
WinXP: Solver: An unexpected internal error occurred ... Ken Dahlberg Excel Programming 1 May 6th 04 05:35 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"