LoubnaHhch
XLDnaute Nouveau
Bonjour tout le monde,
j'ai un petit code qui m'affiche (pas tout le temps) l'erreur 28 : Espace de pile insuffisant.
Voilà mon code :
-------------------------- Début Code ---------------
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 3 To 357
If Not Intersect(Target, Range("F" & i, "Q" & i)) Is Nothing And (Cells(i, 6) <> 0 Or Cells(i, 7) <> 0 Or Cells(i, 8) <> 0 Or Cells(i, 9) <> 0 Or Cells(i, 10) <> 0 Or Cells(i, 11) <> 0 Or Cells(i, 12) <> 0 Or Cells(i, 13) <> 0 Or Cells(i, 14) <> 0 Or Cells(i, 15) <> 0 Or Cells(i, 16) <> 0) Or (Cells(i, 17) <> 0) Then Cells(i, 18) = 0
Next i
For i = 3 To 357
If Not Intersect(Target, Range("R" & i)) Is Nothing And Cells(i, 18) <> 0 Then Range("F" & i, "Q" & i) = 0
Next i
For i = 3 To 357
If Not Intersect(Target, Range("E" & i, "Q" & i)) Is Nothing And (Cells(i, 5).Value = "" And (Cells(i, 6) <> 0 Or Cells(i, 7) <> 0 Or Cells(i, 8) <> 0 Or Cells(i, 9) <> 0 Or Cells(i, 10) <> 0 Or Cells(i, 11) <> 0 Or Cells(i, 12) <> 0 Or Cells(i, 13) <> 0 Or Cells(i, 14) <> 0 Or Cells(i, 15) <> 0 Or Cells(i, 16) <> 0 Or Cells(i, 17) <> 0 Or Cells(i, 18) <> 0)) Then MsgBox "Please enter UOM"
Next i
End Sub
-------------------------- Fin Code ------------------
Merci de m'aider à résoudre le souci
j'ai un petit code qui m'affiche (pas tout le temps) l'erreur 28 : Espace de pile insuffisant.
Voilà mon code :
-------------------------- Début Code ---------------
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 3 To 357
If Not Intersect(Target, Range("F" & i, "Q" & i)) Is Nothing And (Cells(i, 6) <> 0 Or Cells(i, 7) <> 0 Or Cells(i, 8) <> 0 Or Cells(i, 9) <> 0 Or Cells(i, 10) <> 0 Or Cells(i, 11) <> 0 Or Cells(i, 12) <> 0 Or Cells(i, 13) <> 0 Or Cells(i, 14) <> 0 Or Cells(i, 15) <> 0 Or Cells(i, 16) <> 0) Or (Cells(i, 17) <> 0) Then Cells(i, 18) = 0
Next i
For i = 3 To 357
If Not Intersect(Target, Range("R" & i)) Is Nothing And Cells(i, 18) <> 0 Then Range("F" & i, "Q" & i) = 0
Next i
For i = 3 To 357
If Not Intersect(Target, Range("E" & i, "Q" & i)) Is Nothing And (Cells(i, 5).Value = "" And (Cells(i, 6) <> 0 Or Cells(i, 7) <> 0 Or Cells(i, 8) <> 0 Or Cells(i, 9) <> 0 Or Cells(i, 10) <> 0 Or Cells(i, 11) <> 0 Or Cells(i, 12) <> 0 Or Cells(i, 13) <> 0 Or Cells(i, 14) <> 0 Or Cells(i, 15) <> 0 Or Cells(i, 16) <> 0 Or Cells(i, 17) <> 0 Or Cells(i, 18) <> 0)) Then MsgBox "Please enter UOM"
Next i
End Sub
-------------------------- Fin Code ------------------
Merci de m'aider à résoudre le souci