VBA Help for solver


Posted by Dan Newton on August 06, 2000 9:40 PM

I have a problem which is both excel and VBA orientated. I have a spreadsheet in which I require multiple uses of the solver
add-in (approx 100 repitions). If I write a macro (shown below) to run solver on the numerous different cells, the "solver
results" window pops up for each iteration of solver.

For a = 1 To 300 Step 3
solverOK SetCell:=Range("$E$" & 115 + a & ""), _
MaxMinVal:=3, _
ValueOf:="0", _
ByChange:=Range("$C$" & 115 + a & "")
SolverSolve
Next a

I wish to elimate this pop-up so that the solver solution is automatically saved each time. I firstly tried to by-pass this
problem by writing some VB code to simulate the solver but was unable to effectively simulate the precision and tolerance
options of solver. I have attempted what I think to be all options to solve this and have been unsuccesful. I know that it
will probably end up being a simple one line of code that will solve this problem and would greatly appreciate any
help/input you could provide!!

Cheers!!

Daniel Newton

Posted by Ivan Moala on August 08, 0100 1:23 AM

Re: sorry

Try Solversolve(True)


HTH

Ivan

Posted by david on August 07, 0100 2:07 AM

ave you tried solverok instead of solversolve
http://msdn.microsoft.com/library/officedev/office97/output/F1/D3/S5A7E4.HTM

Posted by Dan on August 07, 0100 8:31 PM

I have tried using solverok (as below) instead of solversolve, but then solver doesn't even execute:



Posted by david on August 07, 0100 9:02 PM

sorry


I just read about it sorry it didn't help.
Good hunting.