Académique Documents
Professionnel Documents
Culture Documents
Dim l As Double
Application.Calculation = xlCalculationManual
With ThisWorkbook.Worksheets("Forces")
nComb = .Cells(9, 26).Value
nRow = .Cells(11, 26).Value
End With
RefIndex = 0
ElemName = 0
ColName = 0
Level = 0
Loadcase = 0
l=0
Ntop = 0
Vztop = 0
Vytop = 0
Ttop = 0
Myytop = 0
Mzztop = 0
Nbot = 0
Vzbotp = 0
Vybot = 0
Tbot = 0
Myybot = 0
Mzzbot = 0
With ThisWorkbook.Worksheets("Forces")
RefIndex = .Cells(iRow + 3, 1)
ElemName = .Cells(iRow + 3, 2)
ColName = .Cells(iRow + 3, 3)
Level = .Cells(iRow + 3, 4)
Loadcase = .Cells(iRow + 3, 7)
l = .Cells(iRow + 3, 5)
Ntop = -1 * .Cells(iRow + 3, 9)
Vztop = .Cells(iRow + 3, 10)
Vytop = .Cells(iRow + 3, 11)
Ttop = .Cells(iRow + 3, 12)
Myytop = .Cells(iRow + 3, 13)
Mzztop = .Cells(iRow + 3, 14)
'The following paragraph checks the sections against the forces starting from the smallest the first section
'in the list. In case the section fails the next list is checked.
End With
.Cells(8, 5) = RefIndex
.Cells(8, 6) = ElemName
.Cells(8, 7) = ColName
.Cells(8, 8) = Level
.Cells(8, 9) = Loadcase
.Cells(22, 7) = iSection
.Cells(14, 4) = l
.Cells(14, 5) = Ntop
.Cells(14, 6) = Vztop
.Cells(14, 7) = Vytop
.Cells(14, 8) = Ttop
.Cells(14, 9) = Myytop
.Cells(14, 10) = Mzztop
.Cells(15, 5) = Nbot
.Cells(15, 6) = Vzbotp
.Cells(15, 7) = Vybot
.Cells(15, 8) = Tbot
.Cells(15, 9) = Myybot
.Cells(15, 10) = Mzzbot
Application.Calculate
'The following paragraph the output of the calculations are copied into the worksheet "Output"
With ThisWorkbook.Worksheets("Output")
If ThisWorkbook.Worksheets("CALCULATIONS").Cells(72, 17) <=
ThisWorkbook.Worksheets("Forces").Cells(14, 26) Then
.Cells(iRow + 4, 1) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(8, 5)
.Cells(iRow + 4, 2) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(8, 6)
.Cells(iRow + 4, 3) = ThisWorkbook.Worksheets("REPORT").Cells(19, 4)
.Cells(iRow + 4, 4) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(72, 17)
Else
.Cells(iRow + 4, 1) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(8, 5)
.Cells(iRow + 4, 2) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(8, 6)
.Cells(iRow + 4, 3) = "MANUAL CHECK"
.Cells(iRow + 4, 4) = ThisWorkbook.Worksheets("CALCULATIONS").Cells(72, 17)
End If
End With
Next iRow
Application.Calculation = xlCalculationManual
End Sub