Msg = "Enter new employee name:"
EmployeeName = InputBox(Msg, vbCancel)
If EmployeeName = "" Then Exit Sub '
Do
Flag = 0
Msg = "Enter new employee name:"
For i = 10 To 160
If ActiveSheet.Cells(i, 4) = EmployeeName Then Flag = 1
Next
If Flag = 1 Then Msg = "There is already an employee by that name..try
again:"
If Flag = 1 Then EmployeeName = InputBox(Msg, vbCancel)
Loop While Flag = 1
Thanks, Moo, for your help!
-Dave
--
Applewine
------------------------------------------------------------------------
Applewine's Profile:
http://www.excelforum.com/member.php...fo&userid=5512
View this thread:
http://www.excelforum.com/showthread...hreadid=397585