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

"....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