Results 1 to 2 of 2

Thread: displaying calculation in a label

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    WestCoast - Cali
    Posts
    116

    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

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Mar 2002
    Location
    WestCoast - Cali
    Posts
    116
    nevermind i think i actually figured it out...at least for now

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width