1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
| Sub nouveau()
Sheets("interface").Select
Range("A1").Select
End Sub
Sub produit() 'bouton VALIDER
Sheets("interface").Select
'test Additif 744-940U
Range("f26").Select
If Trim(UCase(ActiveCell)) = "ATTENTION" Then
Dim TExte As String
TExte = "NE PAS PROGRAMMER A LA SUITE :" & Chr$(13)
TExte = TExte & "MF 135-1 U" & Chr$(13)
TExte = TExte & "MF 40 U" & Chr$(13)
TExte = TExte & "MF 60 U" & Chr$(13)
TExte = TExte & "MF 8160 U" & Chr$(13)
TExte = TExte & "MF 8160 USP" & Chr$(13)
TExte = TExte & "MF 8360 U" & Chr$(13)
TExte = TExte & "1732 P45" & Chr$(13)
TExte = TExte & "MF 8170 U" & Chr$(13)
TExte = TExte & "MF 8370 u" & Chr$(13)
reponse = MsgBox(TExte, vbCritical + vbOKOnly, "ATTENTION AU PROGRAMME")
End If
Range("F25:G25").Copy
Sheets("PLANFAB").Select
If ActiveCell.Column = 3 Or ActiveCell.Column = 9 Then
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End If
For l = 4 To 58
If Cells(l, 3).Value <> "" Then
j = l - 1
While j >= 4 And Cells(j, 3).Value <> Cells(l, 3).Value
j = j - 1
Wend
If j = 3 Then
Cells(l, 5).Value = 1
Cells(l, 6).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 2001"
Else
Cells(l, 5).Value = Cells(j, 5).Value + 1
If Cells(l, 5).Value <= 9 Then
Cells(l, 6).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 200" & Cells(l, 5).Value
Else: Cells(l, 6).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 20" & Cells(l, 5).Value
End If
End If
End If
Next
For l = 4 To 58
If Cells(l, 9).Value <> "" Then
j = l - 1
While j >= 4 And Cells(j, 9).Value <> Cells(l, 9).Value
j = j - 1
Wend
If j = 3 Then
Cells(l, 11).Value = 1
Cells(l, 12).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 3001"
Else
Cells(l, 11).Value = Cells(j, 11).Value + 1
If Cells(l, 11).Value <= 9 Then
Cells(l, 12).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 300" & Cells(l, 11).Value
Else: Cells(l, 12).Value = Cells(1, 14).Value & Cells(1, 6).Value & " 30" & Cells(l, 11).Value
End If
End If
End If
Next
End Sub
Sub retour()
Sheets("PLANFAB").Select
End Sub |
Partager