Turtleman10
Technical User
I am very new to this so please excuse my ignorance.
I am trying to implement this code
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Declaration
Dim strSubject As String
Dim strPartN As String
Dim strShipDT As String
Dim strPO As String
Dim strDesc As String
Dim strPiec As String
strSubject = Item.Subject
If strSubject = "KEC" Then
strPartN = InputBox("Part Number", "Please insert Part number")
strShipDT = InputBox("Ship Date", "Please insert Ship date")
strPO = InputBox("P.O", "Please insert P.O number")
strSubject = "PN" + strPartN + "_SD_" + strShipDT + "_PO_" + strPO
End If
If strSubject = "GNC" Then
strPartN = InputBox("Part Number", "Please insert Part number")
strDesc = InputBox("Part Description", "Please insert Part Description")
strPO = InputBox("P.O", "Please insert P.O number")
strPiec = InputBox("Number of Pieces", "Please insert number of Pieces")
strShipDT = InputBox("Ship Date", "Please insert Ship date")
strSubject = strPartN + ", " + strDesc + ", " + strPO + ", " + strPiec + ", " + strShipDT
End If
End Sub
How I am doing it is I am creating a new module and then putting in this code unfortunately it is not being recognized as a macro so I cannot execute it. does anyone have an idea what I am doing wrong?
I am trying to implement this code
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
'Declaration
Dim strSubject As String
Dim strPartN As String
Dim strShipDT As String
Dim strPO As String
Dim strDesc As String
Dim strPiec As String
strSubject = Item.Subject
If strSubject = "KEC" Then
strPartN = InputBox("Part Number", "Please insert Part number")
strShipDT = InputBox("Ship Date", "Please insert Ship date")
strPO = InputBox("P.O", "Please insert P.O number")
strSubject = "PN" + strPartN + "_SD_" + strShipDT + "_PO_" + strPO
End If
If strSubject = "GNC" Then
strPartN = InputBox("Part Number", "Please insert Part number")
strDesc = InputBox("Part Description", "Please insert Part Description")
strPO = InputBox("P.O", "Please insert P.O number")
strPiec = InputBox("Number of Pieces", "Please insert number of Pieces")
strShipDT = InputBox("Ship Date", "Please insert Ship date")
strSubject = strPartN + ", " + strDesc + ", " + strPO + ", " + strPiec + ", " + strShipDT
End If
End Sub
How I am doing it is I am creating a new module and then putting in this code unfortunately it is not being recognized as a macro so I cannot execute it. does anyone have an idea what I am doing wrong?