LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default SolverSolve function exits abnormally

Hello all,

I am running an optimization problem and am using function to iterate solver.

-------------------------------------------------------------------------
Private Function RunSolverNoLimit(vCosts As String, vVols As String, vChk As
String, vSales As String)

Application.ScreenUpdating = False

SolverReset
SolverOk SetCell:=vCosts, MaxMinVal:=2, ByChange:=vVols, Engine:=2

SolverOptions AssumeNonNeg:=True

SolverAdd CellRef:=vChk, Relation:=2, FormulaText:=vSales

SolverSolve UserFinish:=True
Solverfinish Keepfinal:=1

Application.ScreenUpdating = True

End Function
-------------------------------------------------------------------------

All the arguments are Named ranges in the same sheet as the function.
This code is working in one file but not in the other.

In the new file, the function just dies out after SolverSolve, never
reaching SolverFinish. It does solve the problem though.

Interestingly, when I track the function by 'Stepping in', I can run the
SolverSolve in the debug box and it works without ending the function.
However if the line in the function executes, the optimization goes through
but the routine just exits (and I mean it doesn't go back to the calling
function; instead the whole run ends).

Any ideas?

Best regards,
Ashish
 
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
SolverSolve return values Steve M Excel Programming 1 August 24th 06 02:39 AM
SOLVER solversolve showref woof Excel Programming 3 June 26th 06 05:04 PM
Solver: 2nd function of SolverSolve zaina Excel Programming 3 June 18th 05 08:00 AM
How does Solversolve Control Macro Dacvid Cardner Excel Programming 1 June 17th 04 07:41 PM
Excel2000 VBA - Workbook size increases abnormally. Manisha[_3_] Excel Programming 1 February 11th 04 08:15 AM


All times are GMT +1. The time now is 06:41 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"