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: 1
Default "unexpected error" when running solver from a macro


hi there,
i'm having trouble running the solver from a macro and i was wonderin
if you guys could help me with it

the error message is

"Solver: An unexpected internal error occured, or available memory wa
exhausted."

here's the code:

SolverReset
SolverAdd CellRef:=cellrefstring1, Relation:=2
FormulaText:=cellrefstring2
SolverOptions Iterations:=32767, Precision:=0.1, StepThru:=False
Estimates:=2, Derivatives:=1, SearchOption:=1, Scaling:=False
Convergence:=0.1, AssumeNonNeg:=False, AssumeLinear _
:=True
SolverOk MaxMinVal:=3, ValueOf:="0", ByChange:=bychangestring
SolverSolve

"cellrefstring1" and "bychangestring" are string-type variables.

running the macro line by line, i found that the error occurs after th
SolverOk line.
i also realised that if i dont leave the "SetCell" option empty, an
set it to a dummy cell (that isnt affected by the ByChange cells),
will not have this problem on my computer.

however this "workaround" didnt work on almost every other compute
i've tried. i use excel 2002. i've tried this code on a few machine
running excel 2002 and 2003.

i doubt it is a problem with referencing to solver.xla because i chec
this everytime before i run the macro on a different machine.

if this is an old problem that has been mentioned before, i woul
gladly do a readup if someone would give me directions or point me to
page/thread.


thanks in advanc

--
floodgat
-----------------------------------------------------------------------
floodgate's Profile: http://www.excelforum.com/member.php...fo&userid=1477
View this thread: http://www.excelforum.com/showthread.php?threadid=26429

 
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
what does error message "too many adjustable cells" mean in solver dee Excel Discussion (Misc queries) 1 August 27th 09 03:43 AM
Circular reference error when trying to keep a "running Tally" CrisT Excel Discussion (Misc queries) 0 June 26th 07 06:00 PM
"An unexpected error has occured" Froshawn Excel Discussion (Misc queries) 0 April 16th 07 07:32 AM
Sheets("Rpt").Copy different results from running in macro than off excel menu?? tmbo Excel Discussion (Misc queries) 7 August 9th 06 01:13 PM
"Programmatic Access to be Denied" displays when running macro on excel in XP Stephen Fong Excel Programming 3 October 21st 03 09:19 AM


All times are GMT +1. The time now is 04:58 PM.

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"