Bonjour,
J'ai un problème
Il nous a été demandé de calculer la contrainte .
J'ai fait le code suivant :
Sub calculcontraint()
Dim i As Integer, j As Integer, k As Integer
Dim sigma As Double
Dim E As Long, L As Long
Dim NbElm As Integer
Dim pti As Double, ptj As Double
Dim Vectc As Double, Vects As Long
Dim DepX As Double, DepY As Double
NbElm = Cells(2, 14) + 3
i = 0
j = 0
k = 0
Do Until i = NbElm
E = Cells(3, 25)
L = Cells(3, 18)
If i > 4 Then
E = Cells(4, 25)
L = Cells(5, 18)
End If
pti = Cells(i, 15)
ptj = Cells(i, 16)
DepX = Cells(pti, 9)
DepY = Cells(ptj, 10)
Vectc = Array(-Cells(i, 19), -Cells(i, 20), Cells(i, 19), Cells(i, 20))
sigma = (E / L) * (Vectc * Array(DepX, DepY))
i = i + 1
Loop
End Sub
Sauf que ça me mets erreur : dépassement de capacité
Si tu peux m'éclairer stp
Merci et désolé pour le dérangement