ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I force user to enter their ID# before filling other data? (https://www.excelbanter.com/excel-programming/429090-how-do-i-force-user-enter-their-id-before-filling-other-data.html)

Doc Pete

How do I force user to enter their ID# before filling other data?
 
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.

Don Guillett

How do I force user to enter their ID# before filling other data?
 
One way is to not allow ANY entries until entered. Right click sheet
tabview codeinsert 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


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Doc Pete" <Doc
wrote in message
...
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.




All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com