|
-
Apr 12th, 2002, 11:37 PM
#1
Thread Starter
Lively Member
displaying calculation in a label
Ok i have an item from a combobox that has a set price which is displayed in lblprice. When information is entered into the txtqty i want it to take the lblprice and calculate that with the txtqty to equal lbltotal. It works fine for the first item(0) but when i delete the number in qty to change the qty it gives a type mismatch error 13. Also the price shows up for the other times but when i enter in a qty into the txtqty it doesnt calculate the lbltotal for the rest of the itmes.
I know its confusing but any insight will be appreciated. I dont know if index is even how you count how many txtbox items are in an array?
Private Sub txtQty_Change(Index As Integer)
Dim i As Integer
For i = 0 To txtQty(i).Index
lblTotal(i).Caption = FormatCurrency(txtQty(i).Text * lblPrice (i).Caption)
Next i
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|