View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stephen Stephen is offline
external usenet poster
 
Posts: 106
Default Using a variable in solver

I am tring to use a macro so that a user can input a number into a call and
when the macro is run the solver references that cell.(e25 in this case.)
When I run the code it seems to default to the current settings in the solver
and not the referenced cell. I have tried resetting the values on the
solver. Anyone have any thoughts. Here is the code I am using:

SolverOk SetCell:="$B$25", MaxMinVal:=0.01, _
ValueOf:=Range("$e$25").Value, _
ByChange:="$B$22"
SolverSolve

Thanks.

Stephen