Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Solver in macros

How is it possible to create a macro that uses Solver to calculate a target
cell, by changig the value of an inputbox?


So far I have recorded the solver code like this:

SolverOK SetCell:="$H$25", MaxMinVal:=3, ValueOf:=Nettverk, ByChange:="$C$16"

Nettverk is defined as the value of the inputbox. What am I missing to
complete this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Solver in macros

Just for feedback, your code worked ok for me using a simple model.

Your code worked ok for me

Sub Demo()
Dim Nettverk
Nettverk = InputBox("Value")
SolverOK SetCell:="H25", MaxMinVal:=3, ValueOf:=Nettverk,
ByChange:="C16"
SolverSolve True
End Sub

This worked ok also:

Sub Demo2()
SolverOK SetCell:="H25", MaxMinVal:=3, ValueOf:=InputBox("Value"),
ByChange:="C16"
SolverSolve True
End Sub


--
Dana DeLouis
Win XP & Office 2003


"Traima" wrote in message
...
How is it possible to create a macro that uses Solver to calculate a
target
cell, by changig the value of an inputbox?


So far I have recorded the solver code like this:

SolverOK SetCell:="$H$25", MaxMinVal:=3, ValueOf:=Nettverk,
ByChange:="$C$16"

Nettverk is defined as the value of the inputbox. What am I missing to
complete this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
solver in macros Gabru Excel Discussion (Misc queries) 0 September 1st 06 04:05 PM
webquery and solver macros icestationzbra Excel Discussion (Misc queries) 2 February 23rd 06 06:47 PM
Solver does not work from Macros mjd918 Setting up and Configuration of Excel 1 January 6th 06 04:15 PM
Solver, macros Excel scaroca Excel Worksheet Functions 2 September 6th 05 01:34 AM
Using solver in macros - Help TOBY Excel Programming 0 July 13th 04 09:36 AM


All times are GMT +1. The time now is 04:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"