INSTRUCTIONS FOR SIMPLE WEIBULL MONTE CARLO SIMULATION IN Excel FOR USE WITH SuperSMITH(R):
0) Start Excel allowing Macros to be added.
1) Access Macro programming with TOOLS / MACRO / VISUAL-BASIC-(VB)-EDITOR ... or equivalent.
2) Add a Form if one is not already provided.
3) Add a Command Button on the Form.
4) Click (or double-click) the Command Button to access its code programming area.
5) Put the VB code (below) in the default Command Button "Click" programming area.
>>> NOTE: The "Private Sub CommandButton1_Click()" and "End Sub" lines are already provided.
6) Run the Macro and click on the Command Button to activate and fill cells with data.
7) Each time you click the Command Button, a new random number seed is used.


'VB CODE:
Private Sub CommandButton1_Click() <<< DO NOT ADD THIS LINE IF ALREADY PRESENT
iwbeta = 3
iweta = 1000: iweta0 = iweta
iwtotaltime1 = 0: iwtotaltime2 = 0: iwtotaltime3 = 0
iwin% = 100
Randomize Timer
For iwi% = 1 To iwin%
iwrand = Rnd()
iweta = iweta0
iw = iweta * (-Log(iwrand)) ^ (1 / iwbeta)
iwtotaltime1 = iwtotaltime1 + iw
Range("A" + LTrim$(Str$(iwi%))).Value = iw
Range("E" + LTrim$(Str$(iwi%))).Value = iwtotaltime1
Range("F" + LTrim$(Str$(iwi%))).Value = iwi%
iwrand = Rnd()
iweta = iweta0 + iwi% * iweta0 / (0.5 * iwin%)
iw = iweta * (-Log(iwrand)) ^ (1 / iwbeta)
iwtotaltime2 = iwtotaltime2 + iw
Range("B" + LTrim$(Str$(iwi%))).Value = iw
Range("H" + LTrim$(Str$(iwi%))).Value = iwtotaltime2
Range("I" + LTrim$(Str$(iwi%))).Value = iwi%
iwrand = Rnd()
iweta = iweta0 - iwi% * iweta0 / (1.1 * iwin%)
iw = iweta * (-Log(iwrand)) ^ (1 / iwbeta)
iwtotaltime3 = iwtotaltime3 + iw
Range("C" + LTrim$(Str$(iwi%))).Value = iw
Range("K" + LTrim$(Str$(iwi%))).Value = iwtotaltime3
Range("L" + LTrim$(Str$(iwi%))).Value = iwi%
Next iwi%
End Sub <<< DO NOT ADD THIS LINE IF ALREADY PRESENT
