#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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
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 Alonso[_2_] Excel Worksheet Functions 4 November 12th 08 10:41 PM
Using Solver [email protected] Excel Worksheet Functions 2 March 30th 08 09:37 PM
Solver Help brownti via OfficeKB.com Excel Worksheet Functions 9 July 2nd 07 05:08 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM
Solver Lynne Kelly via OfficeKB.com Excel Discussion (Misc queries) 1 May 28th 05 01:21 AM


All times are GMT +1. The time now is 11:46 AM.

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

About Us

"It's about Microsoft Excel"