will this run? any tips in converting? thanks! :D
Sub STOCHRUN()
'
' STOCHRUN Macro
' Macro recorded 5/4/2001 by Tirso B. Paris
' Revisions 6/3/2005
'
' Keyboard Shortcut: Ctrl+s
'
' Record Starting Time
Application.Goto Reference:="NOW"
Selection.Copy
Application.Goto Reference:="START"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Summary").Select
Columns("H:IV").Select
Selection.EntireColumn.Delete
Range("A1").Select
' ActiveWorkbook.Save
Application.Goto Reference:="WPSW"
ActiveCell = 1
'
Dim NSR As Integer
Dim N1 As Integer
Dim N2 As Integer
NSR = 3
N1 = NSR + 1
N2 = NSR + 2
'
' INSERT THESE TO AVE AND STDEV RESPECTIVELY
For I = 1 To NSR
Application.Run "APSMRUN"
Application.Run "CopySimResults"
Calculate
Next
Range("I2").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveCell.FormulaR1C1 = "Means"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "StDev"
ActiveCell.Offset(3, -1).Range("A1").Select
' Change to N1
ActiveCell.FormulaR1C1 = "=AVERAGE(RC[-4]:RC[-2])"
ActiveCell.Offset(0, 1).Range("A1").Select
'
' Change to N2
ActiveCell.FormulaR1C1 = "=STDEV(RC[-5]:RC[-3])"
ActiveCell.Offset(0, -1).Range("A1:B1").Select
Selection.NumberFormat = "0.0"
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1:A1000").Select
ActiveSheet.Paste
Application.Goto Reference:="WPSW"
ActiveCell = 0
' Record End Time of Run
Application.Goto Reference:="NOW"
Selection.Copy
Application.Goto Reference:="END"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
SIMELAPSED = Application.Range("ELAPSED")
MsgBox "Stochastic Simulation Runs Completed, " & SIMELAPSED & " ELAPSED "
Application.Goto Reference:="DATERUN"
Selection.Copy
Application.Goto Reference:="RUNDATE"
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Sheets("Summary").Select
End Sub
//this part of the code will run
Sub ClearSummary()
'This macro clears the summary sheet for recording purposes'
Sheets("Summary").Select
Columns("H:IV").Select
Selection.EntireColumn.Delete
Sheets("Options").Select
End Sub