Sub Stock_Entrees()
poids_pal = 21
poids_cadres = 22
Application.ScreenUpdating = False
If [E8] <> "" Or [F11] <> "" Then
With Sheets("Stock Int.-entrées")
lig = .[A65536].End(xlUp).Row + 1 'calcul de ligne
pn = [E14].Value - poids_pal - (poids_cadres * [F11].Value) 'Poids net
If lig = 2 Then
num = 320
Else
num = .Cells(lig - 1, 2) + 1
End If
.Cells(lig, 1) = [E8] 'Nom magasinier
.Cells(lig, 2) = num 'Numéro de palette
.Cells(lig, 3) = [D3] 'Titre
.Cells(lig, 4) = [F11] 'Cadres
.Cells(lig, 5) = [E14] 'Poids brut
.Cells(lig, 6) = [E17] 'Date du jour
.Cells(lig, 7) = pn 'Poids net
End With
End If
[E8] = ""
[E14] = ""
[F11] = ""
With Sheets("Feuille à imprimer 2")
imprime_Stock
.PrintOut Preview:=True 'aperçu avant impression
Sheets("Intro Stock Intermédiaire").Activate
End With
Application.ScreenUpdating = True
End Sub
Sub Stock_Sorties()
Application.ScreenUpdating = False
If [E8] <> "" Or [F11] <> "" Then
poids_pal = 21
poids_cadres = 22
With Sheets("Stock Int.-sorties")
lig = .[A65536].End(xlUp).Row + 1 'Calcul de ligne
pn = [E14].Value - poids_pal - (poids_cadres * [F11].Value) 'Poids net
If lig = 2 Then
num = 320
Else
num = .Cells(lig - 1, 2) + 1
End If
.Cells(lig, 1) = [E8] 'Nom magasinier
.Cells(lig, 2) = num 'Numéro de palette
.Cells(lig, 3) = [D3] 'Titre
.Cells(lig, 4) = [F11] 'Nombre de cadres
.Cells(lig, 5) = [E14] 'Poids brut
.Cells(lig, 6) = Date
.Cells(lig, 7) = pn 'Poids net
End With
With Feuil26
pn = [E14].Value - 21 - (22 * [F11].Value) 'Poids net
lig = .[A65536].End(xlUp).Row + 1
If lig = 2 Then
num = Sheets("Stock Int.-entrées").Cells(lig, 2)
Else
num = .Cells(lig - 1, 2) + 1
End If
.Cells(lig, 1) = [E8] 'Nom magasinier
.Cells(lig, 2) = num 'N° de palette
.Cells(lig, 3) = [D3] 'Titre
.Cells(lig, 4) = [F11] 'Nombre de cadres
.Cells(lig, 5) = [E14] 'Poids brut
.Cells(lig, 6) = Date
.Cells(lig, 7) = pn 'Poids net
End With
End If
[E8] = ""
[E14] = ""
[F11] = ""
Application.ScreenUpdating = True
End Sub