PDA

View Full Version : Solved: Combobox data to listbox or textbox?



jibber1988
04-22-2010, 03:43 AM
Hi.

I have a huge problem, by creating an itemcalculator.

I have 2 rows - 1 with itemnumber and 1 with price.

Now I want to choose the itemnumber from the combobox.

From the choice I have made in combobox I would like my program to show the price in either a textbox or a listbox next to it.

Does anyone know an easy way to make this possible?

By the way, I have more than 200 itemnumbers listed, and I hope not to type all of them into the VBA code.

Thanks

mdmackillop
04-22-2010, 05:23 AM
Welcome to VBAX

Make your combo 2 columns wide
Set column 2 width to 0
Set Bound Column to 2
Load Number and Price into the combo
You should then see the Item Number, but output the Item Price

jibber1988
04-22-2010, 05:44 AM
Welcome to VBAX

Make your combo 2 columns wide
Set column 2 width to 0
Set Bound Column to 2
Load Number and Price into the combo
You should then see the Item Number, but output the Item Price
Thanks a lot... You just saved my day.: pray2:

But how do you change the input in the boxes?

I don't see where you make the input of your rows..

mdmackillop
04-22-2010, 06:58 AM
I created a dynamic range name called Data and refer to that in the RowSource property of the Combo

jibber1988
04-22-2010, 11:29 PM
Okay, but how do I connect the textbox Kilopris to the combobox Materiale in the 4th row in this worksheet?

As you can see it is an example to calculate some prices.

All in all I just want to connect the prices to material from the sheet "materiale"

Aussiebear
04-23-2010, 01:01 AM
Go through the code MD has provided and change the range reference the "Data" applies to

jibber1988
04-23-2010, 02:44 AM
Go through the code MD has provided and change the range reference the "Data" applies to

I know, but then i get this message.

Shall i mark only one row or the both of them when i assign name?

You can see here what message i get when i try to change the rowsource from data to my own.