JustCallMeNelson
Board Regular
- Joined
- Jan 20, 2006
- Messages
- 67
Hi everyone,
I have an excel order from for customers that has a BeforePrint that works well and I am happy with:
Private Sub Workbook_BeforePrint(cancel As Boolean)
If Range("D9").Value = "" Or Range("G9").Value = "" Then
MsgBox ("Please enter your Account Name and Account Number")
cancel = True
Exit Sub
End If
If Range("G10") = "" Then
MsgBox ("Please enter an Order Reference")
cancel = True
Exit Sub
End If
If Range("G11") = "" Then
whatduedate = MsgBox("You have not stated when you need these goods (Due Date). Would you like them ASAP?", vbYesNo, "Due Date?")
End If
If whatduedate = vbYes Then
Range("G11").Value = "ASAP"
End If
If whatduedate = vbNo Then
MsgBox ("Please enter the date you would like this order delivered:")
cancel = True
Exit Sub
End If
End Sub
As I said I'm really happy with this and all I need to do is duplicate what it does, but for emails.
Can anyone help?
I have an excel order from for customers that has a BeforePrint that works well and I am happy with:
Private Sub Workbook_BeforePrint(cancel As Boolean)
If Range("D9").Value = "" Or Range("G9").Value = "" Then
MsgBox ("Please enter your Account Name and Account Number")
cancel = True
Exit Sub
End If
If Range("G10") = "" Then
MsgBox ("Please enter an Order Reference")
cancel = True
Exit Sub
End If
If Range("G11") = "" Then
whatduedate = MsgBox("You have not stated when you need these goods (Due Date). Would you like them ASAP?", vbYesNo, "Due Date?")
End If
If whatduedate = vbYes Then
Range("G11").Value = "ASAP"
End If
If whatduedate = vbNo Then
MsgBox ("Please enter the date you would like this order delivered:")
cancel = True
Exit Sub
End If
End Sub
As I said I'm really happy with this and all I need to do is duplicate what it does, but for emails.
Can anyone help?