Is it a way to link a button in the worksheet to the solver?
So that you can use the button to run the solver?
Is it a way to link a button in the worksheet to the solver?
So that you can use the button to run the solver?
Try to record macro for the same.
it wont work when i try it. I got the norwegian version of excel, and the code is the following:
ProblemløserOk Målcelle:="$B$24", MaksMinVerdi:=1, Verdi:="0", Endre:= _
"$B$18:$D$18"
ProblemløserLøs
^ this is what i recorded in the macro when i used the solver
the following gets highlighted in the code: ProblemløserOk . And the error msg says: Compile error: sub of function not defined
Last edited by giraff; 04-02-2008 at 08:13 AM.
I get exactly the same problem (except using US english version).
The following macro code was generated using the record macro function in Excel 2003.
Assigning this macro to a button on the worksheet results in the following error when executed. It also generates the error when executed from the “Tools – Macro – Run” menu pull-down. It functions correctly during the recording process.Please Login or Register to view this content.
“Compile Error : Sub or Function not defined” (SolverOk is highlighted.)
Visual Basic help is pretty cryptic, and virtually no help.
Can anyone enlighten me in plain English as to what’s wrong? How do I go about “defining” the Sub or Function so the dang thing will work?
Thanks
Last edited by Kevin_h; 06-13-2008 at 01:57 PM.
Solution is on the Microsoft forum here: http://forums.microsoft.com/Forums/S...iteID=1&mode=1
You need to use tools:references from the pulldown menu when in the macro edit screen and check SOLVER in the list of references that are displayed.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks