Results 1 to 2 of 2

Thread: comparing and selecting

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Location
    ormond beach FL
    Posts
    2

    comparing and selecting

    I am working on a project that accepts data in text boxes, one as a name, the other as a number.

    Each time these boxes are cleared, the new number is added to the previous running total.

    The (4) command buttons are calculate, clear, summary and exit.

    Calculate keeps a runing total, and the summary displays this information.

    What I need is a way to pick the largest of these numbers entered and the corresponding name and display that information in a MsgBox as the person with the largest amount.


    Thanks,

  2. #2
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Each time you add a number, also add the name and number to an 2 dimensional array:
    VB Code:
    1. Dim NumberArray(999, 1) As String
    2.  
    3. NumberArray(0,0) = "John"
    4. NumberArray(0,1) = "8374"
    5.  
    6. 'make sure to use Val(NumberArray(0,1) when getting the value from the array at a later time.
    <removed by admin>

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