visual studio 2015 - how to update my textbox total price which is in listbox -


what want added item listbox textbox auto update. have done can added in price add quantity 1 if add 1 item more 1 quantity count quantity 1 item price how solve?

enter image description here

count = math.round(qty_of_item, 2) * (product_price)          lblprice.text = (" rm " & count)         listbox1.items.add(product_name)          listbox4.items.add(product_class)         listbox5.items.add(product_size)          listbox3.items.add((" " & math.round(qty_of_item)))         listbox2.items.add(formatcurrency(count))          caculate = count          total = 0          dim price decimal = 0         price = total + caculate          integer = 0 listbox2.items.count - 1 'get item count inside listview             price = (cdec(listbox2.items(0).tostring())) 'get value of item of each item in each listbox row             total += price 'add price total         next          txtsubtotal.text = formatcurrency(total)          gst = total * 0.06         txtgst.text = formatcurrency(gst)          total_after_gst = total + gst         txtfinaltotal.text = formatcurrency(total_after_gst)      else         messagebox.show("qty value cant empty , allow integer", "error", messageboxbuttons.okcancel, messageboxicon.error)      end if 

updated

this still cant fix

you have use price in lieu of caculate in for - next loop

for integer = 0 listbox2.items.count - 1 'get item count inside listview     price = cdec(listbox2.items(i)) 'get value of item of each item in each listbox row     total += price 'add price total next 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -