Say your mandatory field is Cell A1. Then put the following in the
Worksheet Change event of the sheet
Private Sub Worksheet_Change(ByVal Target As Range)
If (Intersect(Target.Cells(1), Range("A1")) Is Nothing) Then
If Trim(Range("A1").Text) = "" Then
MsgBox "Please enter a value in cell A1 before proceeding"
Application.EnableEvents = False
Target.Cells.Clear
Application.EnableEvents = True
End If
End If
End Sub
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.