Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Solver activates other worksheets - why?

Solver in Excel 2002: I have a solver model on the DeNorm worksheet as
shown in code below. Note the two lines setting a global variable
called BypassEvents. On the DeNorm, FitPlot and CapPlot worksheets,
in their Worksheet_Activate and Worksheet_Deactivate modules, I have
the beginning line

If BypassEvents then Exit Sub

Why do I need this? Because the SolverSolve routine activates and
de-activates each of these worksheets at least once each time it is
called, creating all kinds of havoc unless the event modules are
bypassed. The FitPlot worksheet has another solver model on it, but
the CapPlot worksheet doesn't. The cells in the DeNorm solver model
do not refer in any way to anything on those other worksheets.

What gives? Why is SolverSolve doing this, and is there a more direct
way to stop it?

Thanks,
Ken Dahlberg

Private Sub FitButton_Click()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
BypassEvents = True
SolverReset
Application.ScreenUpdating = False
SolverOK setCell:=Range("Q40"), _
MaxMinVal:=2, _
ByChange:=Range(ParmRange) ' ParmRange is a string defining
Application.ScreenUpdating = False ' Changing Cells for the model.
SolverSolve UserFinish:=False
BypassEvents = False
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
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
IF statement based on True/False that activates a certain list box rittzy Excel Worksheet Functions 1 March 19th 10 06:01 AM
redo function loss after auto-save (just installed) activates. JT Spitz Excel Discussion (Misc queries) 0 October 26th 09 04:38 PM
selection from dropdown list activates hyperlink jlind50 Excel Discussion (Misc queries) 1 June 5th 07 03:38 AM
Special Menu activates Web Toolbar BEEJAY Excel Discussion (Misc queries) 0 July 4th 06 01:40 PM
Interesting Solver problem (Solver encounters an error) MrShorty Excel Discussion (Misc queries) 3 December 22nd 05 10:52 PM


All times are GMT +1. The time now is 03:48 PM.

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"