Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using solver
Hi,
I have written a macro to calculate a result based on 5 variables and then uses these variables to analyse a column of values. I would like to use the solver addin to work out the optimal combination of these 5 variables. However running the solver does not trigger the macro to run. The macro is set so that if any of the 5 variables are changed, the macro is triggered. Where am I going wrong. Any help would be appreciated. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using solver
The Solver add-in (which uses VB) disables the Application.EnableEvents while
it is running, so your event macro is not able to detect the changes. Possilbe work-around would be to set your macro to go off when sheet is deactivated, or some other similar event. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Leog" wrote: Hi, I have written a macro to calculate a result based on 5 variables and then uses these variables to analyse a column of values. I would like to use the solver addin to work out the optimal combination of these 5 variables. However running the solver does not trigger the macro to run. The macro is set so that if any of the 5 variables are changed, the macro is triggered. Where am I going wrong. Any help would be appreciated. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Using solver
Thanks for your quick reply.
That explains the problem. Unfortunately the solver does not seem to change the variables directly while trialling different variables. One wasy I can see is to make a formula for each of the cells. Unfortunately this would be more cumbersome to change. "Luke M" wrote: The Solver add-in (which uses VB) disables the Application.EnableEvents while it is running, so your event macro is not able to detect the changes. Possilbe work-around would be to set your macro to go off when sheet is deactivated, or some other similar event. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Leog" wrote: Hi, I have written a macro to calculate a result based on 5 variables and then uses these variables to analyse a column of values. I would like to use the solver addin to work out the optimal combination of these 5 variables. However running the solver does not trigger the macro to run. The macro is set so that if any of the 5 variables are changed, the macro is triggered. Where am I going wrong. Any help would be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Solver | Excel Worksheet Functions | |||
Using Solver | Excel Worksheet Functions | |||
Solver Help | Excel Worksheet Functions | |||
Interesting Solver problem (Solver encounters an error) | Excel Discussion (Misc queries) | |||
Solver | Excel Discussion (Misc queries) |