dversloot1
Board Regular
- Joined
- Apr 3, 2013
- Messages
- 113
Hello,
I'm using a user form to allow users to enter a new Product ID for a New Product Form. I want to stop the user from using a Product ID that is already in use. The code seems to stop any number inputted into the NewID input box.
Any idea why?
Private Sub CreateNewQMA_Click()
Dim Question As String
Question = "ID already exists. Please choose another."
If IsError(Application.Match(NewID.Value, Sheets("Data").Range("B1:B2000"), 0)) Then
If MsgBox(Question, vbOK, "Double Checking") = vbOK Then
NewID.Value = ""
End If
Exit Sub
Else
End If
ClearFields
Range("C3") = NewID.Value
Unload LoadForm
End Sub
I'm using a user form to allow users to enter a new Product ID for a New Product Form. I want to stop the user from using a Product ID that is already in use. The code seems to stop any number inputted into the NewID input box.
Any idea why?
Private Sub CreateNewQMA_Click()
Dim Question As String
Question = "ID already exists. Please choose another."
If IsError(Application.Match(NewID.Value, Sheets("Data").Range("B1:B2000"), 0)) Then
If MsgBox(Question, vbOK, "Double Checking") = vbOK Then
NewID.Value = ""
End If
Exit Sub
Else
End If
ClearFields
Range("C3") = NewID.Value
Unload LoadForm
End Sub