Force Entry into a cell

K

kennyken

Hi

I have a worksheet where users have to input some data . The shee
opens if the 1st required field . How do I ensure that data is entere
into this field and not simply bypassed . I can get the validatio
command to ensure the field is a number which is what I want but i
seems to allow a blank filed if the user simply clicks or Tabs away

T
 
J

jeff

HI,

You could put in a small macro to validate that
something is in: for example, in the
Worksheet_SelectionChange :

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
Application.EnableEvents = False

If Range("A1").Value = "" Then
MsgBox ("You must enter something in A1")
Range("A1").Select
End If
Application.EnableEvents = True

End Sub


jeff
 
Top