Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
SolverOk SetCell:="$B$25", MaxMinVal:=0.01, _
ValueOf:=Range("$e$25").Value, _ ByChange:="$B$22" Hello. In your above code, "MaxMinVal" indicates what type of operation to perform. If should not be set to 0.01 (just 1,2, or 3). See if using MaxMinVal:=3 will work since you are trying to set B25 to a specific value . -- HTH. :) Dana DeLouis Windows XP, Office 2003 "Stephen" wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
THANKS! It works perfectly know.
"Stephen" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Solver with binary variable | Excel Discussion (Misc queries) | |||
Multiple or Variable cell references in Solver (Excel 97) | Excel Worksheet Functions | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
solver can not solve polynomial eq. where one variable is five di. | Excel Worksheet Functions | |||
Resetting Solver Manually to Fix Solver Bug | Excel Programming |