根据ComboBox1select从Worksheet显示Textbox1中的值

想知道是否可以帮助从我的工作表中添加一个值到我的TextBox1取决于select什么ComboBox1项目。

到目前为止,我有这个为我的ComboBox1从我的工作表中拉出一个列表

Private Sub UserForm_Initialize() ' *** Load the companies into the delivering firm combo box *** For Each cell In Range("RejectTitle") If cell <> "" Then Me.RejectTitleNm.AddItem cell End If Next cell End Sub 

现在我正在试图让我的用户窗体显示从工作表到TextBox1取决于combobox的值,但我相信我正走向错误的path?

 Private Sub RejectTitleNm_Change() Me.TextBox1.Text = Worksheets("Sheet1").Range("E5").Value End Sub 

像这样的东西:

 Private Sub RejectTitleNm_Change() Dim f As Range, v v = Me.RejectTitleNm.Value 'find the selected value in the source range Set f = Range("RejectTitle").Find(v, lookat:=xlWhole) Me.TextBox1.Text = "" If Not f Is Nothing Then 'got a match: get value from ColB on same row Me.TextBox1.Text = f.EntireRow.Cells(, "B").Value End If End Sub