Option
Explicit
Public
Function
Formeln(V, M, AV, q1, x, q2, L, BV)
AV = (q1 * L * L / 2 + (q2 - q1) * L / 2 * 1 / 3 * L) / L
BV = (L * q1 * L / 2 + (q2 - q1) * L / 2 * 2 / 3 * L) / L
V = AV - q1 * x - ((q2 - q1) * x ^ 2 / (2 * L))
M = AV * x - q1 * ((x ^ 2) / 2) - ((q2 - q1) * (x ^ 3) / (6 * L))
Formeln = 1
End
Function
Public
Sub
Berechnung()
Dim
q1
As
Single
Dim
q2
As
Single
Dim
L
As
Single
Dim
AV
As
Single
Dim
BV
As
Single
Dim
x
As
Single
Dim
V
As
Single
Dim
M
As
Single
Dim
Max
As
Single
Dim
MaxX
As
Single
Dim
i
As
Integer
Dim
Error
As
Integer
q1 = Tabelle1.Cells(6, 3)
q2 = Tabelle1.Cells(7, 3)
L = Tabelle1.Cells(5, 3)
AV = Tabelle1.Cells(5, 7)
BV = Tabelle1.Cells(6, 7)
For
i = 1
To
21
If
i = 1
Then
x = 0#
Else
x = (L / 20) * (i - 1)
End
If
Error
= Formeln(V, M, AV, q1, x, q2, L, BV)
Tabelle1.Cells(9 + i, 2) = x
Tabelle1.Cells(9 + i, 3) = V
Tabelle1.Cells(9 + i, 4) = M
Tabelle1.Cells(5, 7) = AV
Tabelle1.Cells(6, 7) = BV
Next
i
Max = Application.WorksheetFunction.Max(Range(
"D9:D30"
))
Range(
"G27"
).Value = Max
Range(
"G28"
).Value = MaxX
End
Sub