Hi All,
I have created a simple table and I am trying to link the 2 textboxes to the select from the combobox so when a selection is made the textbox1 and textbox2 will automatically populate. Attached is the code I have tried to use but doesn't work. Any ideas?
Option Explicit
Private Sub ComboBox1_Change()
' Declare the values
Dim fruit As String
Dim findValue As Range
' Set the search range
Set findValue = Sheet1.Range("B:B").Find(What:=fruit, LookIn:=xlValues)
' Link the active cell with the fruit and offset twice, then link offset to textboxs
Me.ComboBox1.Value = findValue
Me.TextBox1.Value = findValue.Offset(0, 1).Value
Me.TextBox2.Value = findValue.Offset(0, 2).Value
End Sub
Bookmarks