Updating TextBox from a combobox selection.

rpadminserver

Board Regular
Joined
Nov 7, 2007
Messages
111
Office Version
  1. 365
Hello all...
I have code for a searchable combo box, that is working just the way I want it to.

Private Sub ComboBox1_change()
Dim i As Long
For i = 1 To Application.WorksheetFunction.CountA(Sheet2.Range("a:a"))
If LCase(Left(Sheet2.Cells(i, 1), 1)) = Me.ComboBox1 And Me.ComboBox1 <> "" Then
Me.ComboBox1.AddItem Sheet2.Cells(i, 1)
End If
Next i
End Sub

My problem:
Sheet 2 - Column B has a code that I need to have appear in a text box.


The best way to explain this is, the search box is for a product. The text box needs to be populated with the corresponding UPC code for that product.

Thanks

Rob
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,999
Messages
6,122,645
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top