hi.. i need help on how to fix the code below..
Please Login or Register to view this content.
hi.. i need help on how to fix the code below..
Please Login or Register to view this content.
Last edited by Leith Ross; 10-19-2011 at 03:03 AM. Reason: Added Code Tags
Hello eina28,
Part of your problem was you had duplicate events. They were empty, no code in them, but the Declaration lines were there. I removed those and added the Option Explicit statement. This will inform you whenever you have not declared a variable or another variable by that name has been declared. Here is the cleaned code. Delete all the other code and paste this code in its place.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
I think you better use validation to prevent duplicate entries e.g in cell A5:
Validation/
custom/
But if you stick to VBA, the worksheet_change event can be reduced to :PHP Code:
=countif(A:A,A5)=1
Please Login or Register to view this content.
Last edited by snb; 10-19-2011 at 05:08 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks