Newbie to VBA, apologies if this seems too simple for words.
I have a spreadsheet and I want to check a date column to ensure that the users cannot enter a date after month end.
I am also being asked to lock the sheet to prevent additions but not deletions.
Cell renge is E5:E100
I have tried
Public sub Validate()
If Worksheets(“Sheet1”).Range(“E5:E100”) < Date Then
MsgBox “Date after month end”, vbOKOnly, Date Check
End If
End sub
Any help would be appreciated.
Thanks,
I have a spreadsheet and I want to check a date column to ensure that the users cannot enter a date after month end.
I am also being asked to lock the sheet to prevent additions but not deletions.
Cell renge is E5:E100
I have tried
Public sub Validate()
If Worksheets(“Sheet1”).Range(“E5:E100”) < Date Then
MsgBox “Date after month end”, vbOKOnly, Date Check
End If
End sub
Any help would be appreciated.
Thanks,