How do I force user to enter their ID# before filling other data?

D

Doc Pete

I am setting up a worksheet to help our staff calculate customer transaction
costs. I want to prevent the staff from entering any data into the worksheet
until they have entered their employee ID in the employee ID cell. In other
words, I want all other data entry cells to remain locked until the person
filling out the worksheet has typed in his or her employee ID.

Thank you for your help.
 
D

Don Guillett

One way is to not allow ANY entries until entered. Right click sheet
tab>view code>insert this

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Range("a1") = "" Then
MsgBox "Enter ID in A1"
Target = ""
End If
Application.EnableEvents = True
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.

Ask a Question

Top