CB.Iterations Example 1

This example runs a simulation for 1000 trials, 100 trials at a time. After each 100 trials, the current number of trials and the mean of the forecast in B7 at that point are put into cells on sheet 4.

Worksheets("sheet1").Activate
For i = 1 To 10
   CB.Simulation 100
   Worksheets("sheet4").Range("A1").Offset(i).Value = CB.Iterations
       Worksheets("sheet4").Range("B1").Offset(i).Value=_
      CB.GetForeStat(Range("B7"), 2)
Next i