Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Checking for Duplicate entry using VBA (?!)


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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking for duplicate entries Daniel- Sydney Excel Discussion (Misc queries) 3 November 7th 06 09:16 AM
Duplicate Checking in Excel anthony Excel Programming 2 September 3rd 04 08:21 PM
Checking for duplicate data Jeremy Excel Programming 2 April 28th 04 06:06 PM
Checking Entry mushy_peas[_24_] Excel Programming 5 April 19th 04 11:13 PM
checking for duplicate worksheets Rick B[_6_] Excel Programming 1 January 22nd 04 06:25 PM


All times are GMT +1. The time now is 09:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"