Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SOLVER solversolve showref

can anyone advise how to use this solversolve option Showref:=. As far as I
can determine it takes a string argument - the name of a function,
'Showtrial' is the example used in the documentaion I can find anywhere.=.
However all my attempts to use it to take control of the solver using VBA (in
my case aiming to bypass the dialog box that appaers when the time limit on
Solver is exceed so that I don'yt have tomanually press the 'continue'
button) indicates an error in Excel - 'The formula you typed contains an
error' and subsequently I get the message 'Macro error at cell
[Solver.XLA]Excel4Functions!A18' Excel is 2002, with WinXp. Any help on why I
can't get this ShowRef:= option of solversolve to work would be very much
appreciated, thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default SOLVER solversolve showref

can anyone advise how to use this solversolve option Showref:=. ??

Hi. I can't tell where the problem is, but here are two initial thoughts.
Set this option prior to SolverSolve..
SolverOptions StepThru:=True

Also, make sure there are no spaces in any of your workbook names, as this
is an undocumented bug.
(Solver Showref can't internally parse the workbook name correctly with
spaces in the name.)

aiming to bypass the dialog box that appears when the time limit on
Solver is exceed...


I am not sure, but based on your question, would anything here help?

Results = SolverSolve(True) 'Disregard popup

Select Case Results
Case 0, 1, 2
'Solver found a solution
' Your code...
Case 10
' Max Time Limit Reached
' Your Code...
Case Else
' Other Problem...
End Select

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"woof" wrote in message
...
can anyone advise how to use this solversolve option Showref:=. As far as
I
can determine it takes a string argument - the name of a function,
'Showtrial' is the example used in the documentaion I can find anywhere.=.
However all my attempts to use it to take control of the solver using VBA
(in
my case aiming to bypass the dialog box that appaers when the time limit
on
Solver is exceed so that I don'yt have tomanually press the 'continue'
button) indicates an error in Excel - 'The formula you typed contains an
error' and subsequently I get the message 'Macro error at cell
[Solver.XLA]Excel4Functions!A18' Excel is 2002, with WinXp. Any help on
why I
can't get this ShowRef:= option of solversolve to work would be very much
appreciated, thanks.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default SOLVER solversolve showref

Dana,

many thanks, the problem seems to have been the file (*.xls) name. It was a
long name (22 charcters) no spaces in it, but it did include some '-'
charcters. Upon shorting the the name to one charcter, I have now got
further and clearly past the error on the line
.........solversolve(Userfinish:=tru, Showref:="Showtrial")

which is where it was firmly stuck before.

thank you again.

"Dana DeLouis" wrote:

can anyone advise how to use this solversolve option Showref:=. ??


Hi. I can't tell where the problem is, but here are two initial thoughts.
Set this option prior to SolverSolve..
SolverOptions StepThru:=True

Also, make sure there are no spaces in any of your workbook names, as this
is an undocumented bug.
(Solver Showref can't internally parse the workbook name correctly with
spaces in the name.)

aiming to bypass the dialog box that appears when the time limit on
Solver is exceed...


I am not sure, but based on your question, would anything here help?

Results = SolverSolve(True) 'Disregard popup

Select Case Results
Case 0, 1, 2
'Solver found a solution
' Your code...
Case 10
' Max Time Limit Reached
' Your Code...
Case Else
' Other Problem...
End Select

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"woof" wrote in message
...
can anyone advise how to use this solversolve option Showref:=. As far as
I
can determine it takes a string argument - the name of a function,
'Showtrial' is the example used in the documentaion I can find anywhere.=.
However all my attempts to use it to take control of the solver using VBA
(in
my case aiming to bypass the dialog box that appaers when the time limit
on
Solver is exceed so that I don'yt have tomanually press the 'continue'
button) indicates an error in Excel - 'The formula you typed contains an
error' and subsequently I get the message 'Macro error at cell
[Solver.XLA]Excel4Functions!A18' Excel is 2002, with WinXp. Any help on
why I
can't get this ShowRef:= option of solversolve to work would be very much
appreciated, thanks.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default SOLVER solversolve showref

...but it did include some '-' characters.

Thank you for that feedback! I've never understood why Solver can't
internally save the correct file name.
If you are interested, here is a discussion on the ShowTrial code that is
not very well documented.

Function ShowTrial(Reason As Integer)

If Reason is 2, then this code was called because the max time option was
exceeded.
At the end of you function, you have to tell the code if you want to
continue, or stop, the solver.
The only old documentation that I found had it backwards for the latest
versions of Excel, so it's a little confusing.
Here's what I use to keep it straight.

Const xContinue As Boolean = False 'Excel 2003
Const xStopRunning As Boolean = True 'Excel 2003

then in your code...
ShowTrial = xContinue
'or
ShowTrial = xStopRunning
End Function

Anyway, hope this helps.
--
Dana DeLouis
Windows XP, Office 2003


"woof" wrote in message
...
Dana,

many thanks, the problem seems to have been the file (*.xls) name. It was
a
long name (22 charcters) no spaces in it, but it did include some '-'
charcters. Upon shorting the the name to one charcter, I have now got
further and clearly past the error on the line
........solversolve(Userfinish:=tru, Showref:="Showtrial")

which is where it was firmly stuck before.

thank you again.

"Dana DeLouis" wrote:

can anyone advise how to use this solversolve option Showref:=. ??


Hi. I can't tell where the problem is, but here are two initial
thoughts.
Set this option prior to SolverSolve..
SolverOptions StepThru:=True

Also, make sure there are no spaces in any of your workbook names, as
this
is an undocumented bug.
(Solver Showref can't internally parse the workbook name correctly with
spaces in the name.)

aiming to bypass the dialog box that appears when the time limit on
Solver is exceed...


I am not sure, but based on your question, would anything here help?

Results = SolverSolve(True) 'Disregard popup

Select Case Results
Case 0, 1, 2
'Solver found a solution
' Your code...
Case 10
' Max Time Limit Reached
' Your Code...
Case Else
' Other Problem...
End Select

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"woof" wrote in message
...
can anyone advise how to use this solversolve option Showref:=. As far
as
I
can determine it takes a string argument - the name of a function,
'Showtrial' is the example used in the documentaion I can find
anywhere.=.
However all my attempts to use it to take control of the solver using
VBA
(in
my case aiming to bypass the dialog box that appaers when the time
limit
on
Solver is exceed so that I don'yt have tomanually press the 'continue'
button) indicates an error in Excel - 'The formula you typed contains
an
error' and subsequently I get the message 'Macro error at cell
[Solver.XLA]Excel4Functions!A18' Excel is 2002, with WinXp. Any help on
why I
can't get this ShowRef:= option of solversolve to work would be very
much
appreciated, thanks.







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
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Solver: 2nd function of SolverSolve zaina Excel Programming 3 June 18th 05 08:00 AM
Resetting Solver Manually to Fix Solver Bug Stratuser Excel Programming 0 September 13th 04 07:04 PM
How does Solversolve Control Macro Dacvid Cardner Excel Programming 1 June 17th 04 07:41 PM
How to call SolverSolve portably for Excel XP and Excel 2000 Chris Russell Excel Programming 3 September 10th 03 05:32 PM


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