抽奖的小程序的问题
编了个抽奖的小程序,可是有问题。不知道问题出在哪?麻烦高手看下。
Dim i As Integer
Dim j As Integer
Dim s As String
Dim a()
Private Sub Command1_Click()
Do
s = InputBox("请输入手机号")
ReDim Preserve a(i)
a(i) = s
i = i + 1
Loop While s <> ""
End Sub
Private Sub Command2_Click()
Timer1.Enabled = Not Timer1.Enabled
If Timer1.Enabled = False Then
MsgBox "恭喜" & Text1.Text & "用户中奖"
End If
End Sub
Private Sub Timer1_Timer()
Randomize
i = Int(i - 3 - 0 + 1) * Rnd - 0
a(j) = i
Text1.Text = a(j)
End Sub
[展开]
终***
2018-04-02 05:30:30
举报