Friday, April 30, 2010

Cable analysis with central point load

The following is a cable analysis with central point load using VBA excel code created by the author to produce approximate numerical solutions:

Private Sub CALC_Click()
Dim e, Lp, i, T As Double
i = Sheets(1).Cells(7, 2).Value
e = Sheets(1).Cells(8, 2).Value
T = Sheets(1).Cells(9, 2).Value
Lp = Sheets(1).Cells(16, 3).Value
For n = Lp To T Step i
Sheets(1).Cells(16, 3).Value = n
If Sheets(1).Cells(16, 9).Value < e Then GoTo 100
Next n
100:
End
End Sub