Results 1 to 2 of 2

Thread: Addition in VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    1

    Thumbs up Addition in VB

    Hi , im having trouble with addition in VB.NET 2003

    I have a listbox which the user inputs a variety of numbers, in the form (minutes.seconds) so, (24.32)

    I am looking for some code/tips/help that adds the total in the listbox, continually updating the total.

    Eg. User Adds 22.32

    Total = 22.32

    User Adds 21.12

    Total = 43.44 e.t.c

    Thanks !

  2. #2
    Addicted Member
    Join Date
    Aug 2003
    Posts
    153
    Unfortunately there doesn't seem to be an event relating to when the number of items changes in a listbox, but you could create your own. Raise the event whenever you clear the listbox, add an item to the listbox, or remove one.

    When you handle the event, just use a private variable that keeps track of the current tally, and add/subtract from it accordingly.

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