Hellowa
XLDnaute Junior
Bonjour à toutes et à tous
J'ai un bug dans une de mes macros,
Elle me renvoi l'image suivante:
Voici mon code
Merci d'avance,
Cordialement,
Eloi
J'ai un bug dans une de mes macros,
Elle me renvoi l'image suivante:
Voici mon code
Code:
Sub calcul_matiere()
Dim ilig As Integer, i As Integer, icol As Integer
Dim poids As Long
'On recherche le matériau, sa densité et son prix
'Qu'on affiche en dessous
For icol = 2 To 6
For ilig = 7 To Sheets("Configurations").Range("F65536").End(xlUp).Row
If Sheets("Matiere").Cells(11, icol).Value = Sheets("Configurations").Cells(i, 5).Value Then
poids = Sheets("Configurations").Cells(i, 6).Value
Sheets("Matiere").Cells(15, icol).Value = Cells(12, icol) * Cells(13, icol) * Cells(14, icol) * poids
End If
Next ilig
Next icol
End Sub
Merci d'avance,
Cordialement,
Eloi