Using solver

L

Leog

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.
 
L

Luke M

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.
 
L

Leog

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top