No matter what I enter in the text box txtDoorSeries when I run with Debug and a watch on DoorCode it always is 1 . It does not fall through the if statements. Am I using the wrong properties?
Thanks for any help.
Sub DrCode()
If Val(txtDoorSeries.Text) = 610 Or 620 Then
DoorCode = 1
ElseIf Val(txtDoorSeries.Text) = 630 Or 631 Or 632 Then
DoorCode = 2
ElseIf Val(txtDoorSeries.Text) = 640 Or 642 Then
DoorCode = 4
ElseIf Val(txtDoorSeries.Text) = 625 Then
DoorCode = 5
ElseIf Val(txtDoorSeries.Text) = 615 Or 616 Then
DoorCode = 9
ElseIf Val(txtDoorSeries.Text) = 650 Or 651 Or 652 Then
DoorCode = 10
Else: MsgBox "Incorrect Door Series Entered", vbCritical + vbOKOnly, "Series Error"
End If
End Sub