Hi forum, I'm newbie in this community and I hope I can catch some help here for my problem.
I search a code and I modified for my userform textbox, but this is not working when I place in the textbox code,

The scenario is, when the combo box in the userform is provided a data, this textbox should run the code and present the data in the textbox.

note: when I place this code in a button and when I clicked, it works properly.

here is the code

Private Sub tbEmpPos_change()
Dim myRange As Range
Set myRange = Worksheets("DataInfo").Range("DataInfotable")
On Error Resume Next 

tbEmpPos.Value = _
Application.WorksheetFunction.VLookup(CboEmpNo, myRange, 3, False)
If Err.Number <> 0 Then tbEmpPos.Value = ""
End Sub