Q1 Q2 Q3 Q4 Total
Return
Seasonality 0.9 1.1 0.8 1.2 origin
Page 2
413397763.xls
Return model to
original values.
Page 3
413397763.xls
Q1 Q2 Q3 Q4 Total
Seasonality 0.9 1.1 0.8 1.2
The constraint d
Page 4
413397763.xls
Page 5
Setup so you can Call Solver from a Macro
How to:
Create your model with Solver as usual. Save it.
Open the VBA Editor (ALT+F11) and choose Tools, References The 12 Solver-related func
to open the "References - VBAProject" dialog shown below. use in VBA code:
Find "Solver" in the list of "Available References" and check it 'on'. Click OK.
Save your workbook.
Look in the VBA Project window for your project. There should now be a folder
with the name "References". If you open this folder, you should see an item
that reads "Reference to SOLVER.XLA". This reference is stored with your
workbook and macros so you don't need to re-establish it every time you
want to run the macro that calls Solver that's in your workbook.
Now in this workbook you can write a macro that invokes Solver
and the invocation can occur under macro control.
Without this setup step, you can record a macro that invokes Solver
but the macro won't run. You'll get an error message like the one below.
The 12 Solver-related functions available for
use in VBA code: