View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
robs3131 robs3131 is offline
external usenet poster
 
Posts: 144
Default On Error Resume Next not stopping pop up message

Hi all,

I have an issue where I am using Solver in my code -- the issue is that once
in a while, the time limit set is exceeded and a message pops asking the user
to select what to do. Below is the Solver code and the message that comes up
-- "On Error Resume Next" is not stopping the message from coming up:

Code:
SolverReset
On Error Resume Next
SolverOk SetCell:="holdclearsumprod", MaxMinVal:=3,
ValueOf:=Range("AL1").Value, ByChange:="holdclearbin"
SolverAdd CellRef:="holdclearbin", Relation:=5, FormulaText:="binary"
SolverOptions MaxTime:=100, Iterations:=100, Precision:=0.000001,
AssumeLinear _
:=False, StepThru:=False, Estimates:=1, Derivatives:=1, SearchOption:=1, _
IntTolerance:=5, Scaling:=False, Convergence:=0.0001, AssumeNonNeg:=False
SolverSolve userfinish:=True

--------------
Message:
"The maximum time limit was reached; continue anyway?

"Continue" "Stop" "Help" "Save Scenario"

--------------
I would like to have the "Stop" selection picked every time by the code when
this situation occurs so that the user does not have to pick anything. Was
wondering what the best way is to do this? I tried "On Error Resume Next" as
seen in the code above, but it is not stopping the message from coming up.

Thanks!

Robert