I have a userform that users insert customer names and info and by clicking the save button it takes the values from textboxes and populates cells of a worksheet. The problem is the users are creating duplicate customers. What I would like to do is before saving the worksheet compare textbox 1, 2 and 3 to columns A, B and C of a worksheet before it adds the info.
I thought I could use the set range .find code with the if not range is nothing then. but that only compares the first .find.
userform.textbox1 = last name which goes into worksheet("customers").column(1)
userform.textbox2 = first name which goes into worksheet("customers").column(2)
userform.textbox3 = middle name which goes into worksheet("customers".column(3)
I figured the code below would work, but doesn't
What if a customer has the same first and last name with a different middle intial?Please Login or Register to view this content.
I'm thinking I have to loop, but not sure how. Please help.
Bookmarks