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!

Categories

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.

Comments

  • pseudocoderpseudocoder Posts: 689Member ✭✭✭
    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

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

    Try that and see if it does what you need.
    HTH
  • 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.