Private Sub ComboBox1_Change()
Dim ws2 As Worksheet
Set ws2 = Sheets("Sheet2")
Dim lastrow As Long
lastrow = ws2.Cells(ws2.Rows.Count, "A").End(xlUp).Row
Dim i As Integer
Dim foundValue As String
TextBox1.Value = ""
For i = 2 To lastrow
If ws2.Cells(i, 1).Value = ComboBox1.Value Then
foundValue = ws2.Cells(i, 2).Value
End If
Next i
TextBox1.Value = foundValue
End Sub
Private Sub ComboBox1_Change()
Dim ws2 As Worksheet
Set ws2 = Sheets("Sheet2")
Dim lastrow As Long
lastrow = ws2.Cells(ws2.Rows.Count, "A").End(xlUp).Row
Dim i As Integer
Dim foundValue As String
TextBox1.Value = ""
For i = 2 To lastrow
If ws2.Cells(i, 1).Value = ComboBox1.Value Then
foundValue = ws2.Cells(i, 2).Value
End If
Next i
TextBox1.Value = foundValue
End Sub