Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default On Error Resume Next not stopping pop up message

Not sure about the add-in, but you could try using....

Application.DisplayAlerts = False

' your code

Application.DisplayAlerts = True



--

Regards,
Nigel




"robs3131" wrote in 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default On Error Resume Next not stopping pop up message

Thanks Nigel - that worked.

I would still be curious to know if there is a way to automatically have
"Stop" chosen at the time that that alert is supposed to come up.

--
Robert


"Nigel" wrote:

Not sure about the add-in, but you could try using....

Application.DisplayAlerts = False

' your code

Application.DisplayAlerts = True



--

Regards,
Nigel




"robs3131" wrote in 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


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
Stopping the Macro Warning Message Jurrasicway Excel Programming 2 June 19th 06 02:57 PM
message without stopping execution? Stefi Excel Programming 19 July 14th 05 12:08 PM
On Error Resume Next Jasper Excel Programming 4 May 12th 05 12:08 PM
Stopping the Update Links Message Matty S Excel Programming 5 June 3rd 04 04:34 PM
ON ERROR RESUME NEXT D.S.[_3_] Excel Programming 7 December 1st 03 09:40 AM


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

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

About Us

"It's about Microsoft Excel"