|
-
May 19th, 2005, 05:45 AM
#1
Thread Starter
New Member
heeelpppppppppp
what would the interface look like for this code?
Private Sub Form_Load()
Option Explicit
Dim i As Integer
Dim MyRecord(1 To 7, 1 To 1) As Long
'Array 1 to 5 are the candidates
'Array 6 is dummy votes
'Array 7 is total votes
Randomize
Dim Vote As Integer
For i = 1 To 10
'Set caption to random a randome number from 1 to 10
Vote = Int(10 * Rnd) + 1
If Vote <= 5 Then
MyRecord(Vote, 1) = MyRecord(Vote, 1) + 1
Else
MyRecord(6, 1) = MyRecord(6, 1) + 1
End If
MyRecord(7, 1) = MyRecord(7, 1) + 1
Next
For i = 1 To 7
Debug.Print MyRecord(i, 1)
Next
End Sub
End Sub
would be appreaciated ! I really need help!!
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
|