Force Entry into a cell

  • Thread starter Thread starter kennyken
  • Start date Start date
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
 
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
 

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.

Ask a Question

Back
Top