Prevent duplicate entry
Posted by Marc Duguay on April 18, 2001 8:09 PM
Hi,
First of all I would like to thank everybody that support this site, I think its a great source of
Informations for a rookie like my self and many others. BRAVO !!!
Now down to business this is what I am trying to accomplish.
Sub CommandButton1_Click()
Worksheets("sheet1").Range("C10") = UserForm1.TextBox1.Value
If Sheets("sheet1").Range("C10") = Sheets("sheet1").Range("A:A") Then
UserForm2.Show
Unload Me
End If
Sheets("Sheet1").Select
Range("C10").Select
Selection.Copy
Range("A30").Select
ActiveSheet.Paste
Unload Me
End Sub
I want the value of C10(part number) to look in column A and see if the
Part numbers already exist.
This reference is my problem { If Sheets("sheet1").Range("C10") = Sheets("sheet1").Range("A:A") Then}
If I use a single cell as reference it works exactly how I want it to, but as soon as
I try to to use column A as a reference I get that familiar Debug box I think
I have seen that dam box 1000000 time.
So please any help would be greatly appreciated
Thank you,
Marc