1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Sub Exam()
init
Open Chem + "alerte.htm" For Output As #1
Print #1, "<html><body><pre>" + vbCr;
Print #1, "<h2>Warning Inventory as of " + Format(Date, "dd/mm/yyyy") + "</h2>" + vbCr;
For LStock = 8 To 32000
If IsEmpty(ShStock.Cells(LStock, KMat)) Then Exit For
PrenDon
If Stock <= (1.1 * Stal) Then
If Stock <= Stal Then
Mess = "Inventory warning reaches for " + Mat + " " + Ref
Datc = CStr(ShStock.Cells(LStock, Kdcec).Value)
If Datc <> "" Then Mess = Mess + vbCrLf + "Order the " + Datc
Else
Mess = "Inventory warning near reached for " + Mat + " " + Ref
End If
Print #1, Mess + vbCr;
End If
Next LStock
Print #1, "</pre></body></html>" + vbCr
Close #1
WkProg.FollowHyperlink Address:=Chem + "alerte.htm", NewWindow:=True
End Sub |
Partager