|
-
Feb 16th, 2002, 12:12 AM
#1
Thread Starter
New Member
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,
-
Feb 16th, 2002, 01:22 AM
#2
PowerPoster
Each time you add a number, also add the name and number to an 2 dimensional array:
VB Code:
Dim NumberArray(999, 1) As String
NumberArray(0,0) = "John"
NumberArray(0,1) = "8374"
'make sure to use Val(NumberArray(0,1) when getting the value from the array at a later time.
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
|