This example runs a simulation. If Crystal Ball stops the simulation after the maximum number of trials (1000 in this example), CB.SimResult puts a 1 in cell B3.
CB.Simulation 1000 Range("B3") = CB.SimResult