TextBox Data

colmguckian

New Member
Joined
Feb 11, 2011
Messages
35
I have a user form with a ComboBox and a TextBox.
The ComboBox is Populated using a named range for the Row Source Property. The range is on column B Sheet1. I have an associated Price value for each Value in the named range. The associated Price value is in the same Row Column C. I need a Code that will display the Price in the text box for each item selected in the ComboBox. Please
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Well since only one item can be selected in a combobox you can just use the ListIndex of that item to get the row it's on in the worksheet.

Pretty straightforward if your data starts in B2.
Code:
Textbox1.Value = Worksheets("Sheet1").Range("C" & ComboBox1.ListIndex+2).Value
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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