1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Sub stock_apres_conso()
Range("B7") = stock_apres_consommation(Range("B5"), Range("B3"))
If Range("B7") < Range("B9") Then
MsgBox ("Stock minimum atteint, veuillez passer une commande")
End If
End Sub
Function stock_apres_consommation(stock_initial As Single, quantite_consommee As Single)
stock_apres_consommation = stock_initial - quantite_consommee
End Function
Function observ_stock_apres_consommation(stock_apres_consommation As Long)
If Range("B7").Value < Range("B9").Value Then
MsgBox ("stock mini atteint, veuillez passer une commande" = vbOKOnly)
Exit Function
End If
End Function |