View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
SteveM SteveM is offline
external usenet poster
 
Posts: 133
Default VBA CODE SOLVER TO RETURN VALUE

On May 26, 10:48 am, Jasper wrote:
"....The model solution value is your SetCell. So you have that defined. The
ByChange value is supposed to be the range of decision variables. If
you are only defining a single cell as a single decision variable,
there's not much of a problem..."

There's the crux, the code works fine, though for some reason the result
will not show in the designated place after the macro is done. Though I ran
out of things that could be wrong about this code.

SolverReset
SolverOk SetCell:="$DV$4, MaxMinVal:=2, ValueOf:=1", ByChange:="$DU$4"
SolverSolve UserFinish:=True
SolverFinish KeepFinal:=1

Thanks so far, I'm looking into Chrystal Ball. Gr.

Jasper


J-

Aren't you glad I told you...?

-S