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
 
Top