I am trying to write a program that for an RPG. the program works like a shop where the user selects the item froma combo box and it is added to a list box, this part works but the function to total the price doesnt work. when i try it overwrites the data already in the box.
Here is the code that i am using
can anyone help?Code:Private Sub Command1_Click() List1.AddItem Combo1.Text Label1.Caption = Combo1.ItemData(Combo1.ListIndex) End Sub Private Sub Form_Load() Combo1.AddItem "Laser pistol" Combo1.ItemData(Combo1.NewIndex) = 1000 Combo1.AddItem "Laser SMG" Combo1.ItemData(Combo1.NewIndex) = 1500 End Sub
thanks in advance




Reply With Quote