ce code me permet de verifier un odre de fabrication
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 Sub verification() Dim ValPrec As String, ValSuivante As String, CompareVals As String Dim i As Integer If ActiveCell.Text = ";MF 135 U;" Then Chrono = ";MF 135 U;MM 71135 U;MM 31762/40;MF 345 U;MM 71791/40;MM 71791/50;MPA 1;PA 71155;MF 50 U;MM 71150 U;MF 160 U;MM RH 71160 U;MM 71160 U;MM 71718/60;MF 360 U;MM 71791/60;MF 370 U;MM 71791/70;MF 175 U;MF 180 U;MF 135 1U;MF 31787;MM 1732 P45;MF 40 U;MF 8150 U;MF 60 U;MF 8160 U;MF 8160 USP;MF 8360 U;MF 8170 U;MF 8370 U;MF 940 U;" For i = 5 To 58 If Cells(i - 1, 3).Value <> "" Then ValPrec = Cells(i - 1, 3).Value If Cells(i, 3).Value <> "" Then ValSuivante = Cells(i, 3).Value CompareVals = ";" & ValPrec & ";" & ValSuivante & ";" If Not Chrono Like "*" & CompareVals & "*" Then MsgBox ("Probleme a la cellule C " & i) Next i End If End Sub
le probleme j'ai plusieurs produits et selon le produits j'ai un odre bien precis a faire et a verifier
j'ai mis ce code en place pour un premier produits
mais rien ne se passe
quelqu'un aurait une idée d'aiguillage?
Partager