Multiplying a value by item selected in a combobox? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Multiplying a value by item selected in a combobox?

Would it be possible for someone to help explain how to multiply a value i.e. the price of a product by an item selected in a combobox e.g. quantity required and display the results in a list box. I have in total 15 checkboxes which each have been assigned a price using a price array but I am unsure as to what to do next. Any guidance would be much appreciated.


  • pseudocoderpseudocoder Posts: 688Member ✭✭✭
    I have a bad habit of misreading questions at times, but if I've read it correctly, you have a fixed cost, a combo box with quanity, and want to add the result to a listbox?

    VB 6 is all I have, so I dunno about other versions. In the combo's click event, you might try something like

    List1.addItem Format(CStr(cost_of_item * CSng(Combo1.List(Combo1.ListIndex))), "####.#0")

    Try that and see if it does what you need.
  • reybornreyborn Posts: 2Member
    Please post your existing code so that we can give you idea on how to solve it.

Sign In or Register to comment.