VBA Listbox selection, connected to textbox

silvertyphoon1

New Member
Joined
Nov 14, 2010
Messages
18
The Lookup information is found on a sheet called “Lookup” the sheet has information is columns A-G. The userform has eight option buttons, a listbox and two textboxes. Column 1 of “Lookup” sheet contains a number that corresponds to a manufacturer of light bulbs. The numbers 1-8 are used to determine which manufacturer it is. Each manufacturer produces a number of bulbs as well. When the user selects an option button the list of bulbs for that given manufacturer is displayed for selection in the listbox. I also have a text field called Length and Wattage. The length is found in the F column of the “Lookup” sheet and the wattage from the E column of the “Lookup” sheet. I would like the corresponding values to populate the text boxes if a bulb is selected in the listbox. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Note: The wattage numbers are values from 1.3-6.3, when it displays I’m looking for values less than 4.04 being displayed as “<4” and values above 4.04 being displayed in the wattage textbox as “4-7.5”. So based on what the wattage is for that particular bulb only one of those two options should be displayed in that textbox. The length can be displayed as it is.<o:p></o:p>
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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