Lock worksheet until the "TODAYS DATE" cell is populted

FisherKat

New Member
Joined
Oct 16, 2018
Messages
14
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.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top