You have to specify which sheet the range is in. Try this:
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
Dim i As Integer
Dim abrv As String
abrv = TextBox3.Text
Sheet2.Activate
For i = 1 To 2494
If abrv = Sheet2.Range("a" & i).Value Then
TextBox4.Text = Sheet2.Range("b" & i).Value
End If
Next i
If TextBox4.Text = "" Then
TextBox4.Text = "Abbreviation does not exist."
End If
End If
Also you might get an error with this:
Range("a" & i)
If you do use this:
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
Dim i As Integer
Dim abrv As String
abrv = TextBox3.Text
Sheet2.Activate
For i = 1 To 2494
If abrv = Sheet2.Range("a" & strings.trim(str(i))).Value Then
TextBox4.Text = Sheet2.Range("b" & strings.trim(str(i))).Value
End If
Next i
If TextBox4.Text = "" Then
TextBox4.Text = "Abbreviation does not exist."
End If
End If