Hi!
I'm looking for a way ensure that no other cell can be populated within a workbook until the "TODAY DATE" cell is populated, which is cell "AE2" on the worksheet.
I'd like to insert the code above my existing VBA.
Sub SendWorkBook()
'Created by 20181018
Dim mystr As String
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
Call YesNoMessageBox
mystr = Sheets("Cover Sheet").Range("AL15").Value 'change sheet name
On Error Resume Next
With OutlookMail
.To = "makebelieve@dream.com"
.CC = ""
.BCC = ""
.Subject = mystr
.Body = "Hello," & vbNewLine & vbNewLine & "This DAF is being submitted for your processing." & vbNewLine & vbNewLine & "Thank You!"
.Attachments.Add Application.ActiveWorkbook.FullName
.Send
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub
Sub YesNoMessageBox()
Dim Answer As String
Dim MyNote As String
MyNote = "Have you saved this document?"
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "Thank You!")
If Answer = vbNo Then
MsgBox "This document will not be sent at this time. Please save your document and then click SUBMIT once more. Thank you."
End
Else
MsgBox "Your Document will now be forwarded to Document Control. Thank you!"
End If
End Sub
Is this possible?
Thank you.
I'm looking for a way ensure that no other cell can be populated within a workbook until the "TODAY DATE" cell is populated, which is cell "AE2" on the worksheet.
I'd like to insert the code above my existing VBA.
Sub SendWorkBook()
'Created by 20181018
Dim mystr As String
Dim OutlookApp As Object
Dim OutlookMail As Object
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
Call YesNoMessageBox
mystr = Sheets("Cover Sheet").Range("AL15").Value 'change sheet name
On Error Resume Next
With OutlookMail
.To = "makebelieve@dream.com"
.CC = ""
.BCC = ""
.Subject = mystr
.Body = "Hello," & vbNewLine & vbNewLine & "This DAF is being submitted for your processing." & vbNewLine & vbNewLine & "Thank You!"
.Attachments.Add Application.ActiveWorkbook.FullName
.Send
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
End Sub
Sub YesNoMessageBox()
Dim Answer As String
Dim MyNote As String
MyNote = "Have you saved this document?"
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "Thank You!")
If Answer = vbNo Then
MsgBox "This document will not be sent at this time. Please save your document and then click SUBMIT once more. Thank you."
End
Else
MsgBox "Your Document will now be forwarded to Document Control. Thank you!"
End If
End Sub
Is this possible?
Thank you.