You should really be more specific, it depends on what you are trying
to do. You could set up data validation on a cell, choose "Custom"
from the Allow dropdown, put "=NOT(ISBLANK(A1))" in the formula box,
and uncheck "Ignore Blank". Then if someone edits A1 and tries to
backspace over what is already there (leaving the cell blank), they
get an error message.
Or if you were creating a userform, you could write some validation
that checks the value of a text box. If it was blank, display error
msg. For example, if you had a userform with a text box named
TextBox1, this code would show an error message if you clicked on it
and then clicked away without typing anything.
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox1.Value = "" Then
Cancel = True
MsgBox "You forgot to type something!", vbCritical
End If
End Sub
HTH,
JP