![]() |
help needed with excel programming!!!
i have two listboxes containing values. i need to multiply these two values
and display the answer in a text box. but am unsure on how to do so! can anyone help please? thanks |
help needed with excel programming!!!
Textbox1.Text = Listbox1.Value * Listbox2.Value
-- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "gem.g" <u23227@uwe wrote in message news:620e45f13d9b3@uwe... i have two listboxes containing values. i need to multiply these two values and display the answer in a text box. but am unsure on how to do so! can anyone help please? thanks |
help needed with excel programming!!!
put the following code into (say) the change event for listbox1 and listbox2
- then the textbox will be updated whenever either value changes. if listbox1.value < "" and listbox2.value < "" then textbox1.value = listbox1.value * listbox2.value end or - simplified textbox1 = listbox1 * listbox2 "gem.g" wrote: i have two listboxes containing values. i need to multiply these two values and display the answer in a text box. but am unsure on how to do so! can anyone help please? thanks |
help needed with excel programming!!!
thanks for the help, it worked!
another problem i have is..... i have allowed the user to select from a combo box which then displays a price into a text box. (that all works fine!!) BUT.. ... how do i multiply this price by a number which is in a list box and then display the answer into another list box??? hope you can help! thanks Giles B wrote: put the following code into (say) the change event for listbox1 and listbox2 - then the textbox will be updated whenever either value changes. if listbox1.value < "" and listbox2.value < "" then textbox1.value = listbox1.value * listbox2.value end or - simplified textbox1 = listbox1 * listbox2 i have two listboxes containing values. i need to multiply these two values and display the answer in a text box. but am unsure on how to do so! can anyone help please? thanks |
help needed with excel programming!!!
Gem,
Very similar to befo In the change event for the two "input" boxes (the ones that are selectable/changeable - e.g. the combobox and the price listbox) put the following: if listbox1.value < "" and textbox1.value < "" then _ listbox2.value = listbox1.value * textbox1.value whe listbox1 is the price listbox listbox2 is the listbox where you want the answer to appear textbox1 is the text box where the price exists Giles "gem.g" wrote: thanks for the help, it worked! another problem i have is..... i have allowed the user to select from a combo box which then displays a price into a text box. (that all works fine!!) BUT.. ... how do i multiply this price by a number which is in a list box and then display the answer into another list box??? hope you can help! thanks Giles B wrote: put the following code into (say) the change event for listbox1 and listbox2 - then the textbox will be updated whenever either value changes. if listbox1.value < "" and listbox2.value < "" then textbox1.value = listbox1.value * listbox2.value end or - simplified textbox1 = listbox1 * listbox2 i have two listboxes containing values. i need to multiply these two values and display the answer in a text box. but am unsure on how to do so! can anyone help please? thanks |
help needed with excel programming!!!
thanks for the help but it didnt work!!!
thanks again Giles B wrote: Gem, Very similar to befo In the change event for the two "input" boxes (the ones that are selectable/changeable - e.g. the combobox and the price listbox) put the following: if listbox1.value < "" and textbox1.value < "" then _ listbox2.value = listbox1.value * textbox1.value whe listbox1 is the price listbox listbox2 is the listbox where you want the answer to appear textbox1 is the text box where the price exists Giles thanks for the help, it worked! another problem i have is..... i have allowed the user to select from a combo [quoted text clipped - 19 lines] can anyone help please? thanks |
All times are GMT +1. The time now is 06:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com