请高手指点,为什么运行这个小的随机抽奖程序时,我无法输入数字?
Private Sub Combo1_Change()
Dim x As Integer
x = 0
Combo1.SelStart = 0
Combo1.SelLength = Len(Combo1.Text)
If keyascii = 13 Then
Combo1.AddItem Combo1.Text, x + 1
End If
If keyascii = 27 Then
If Combo1.ListIndex <> -1 Then
Combo1.RemoveItem Combo1.ListIndex
End If
End If
End SubPrivate Sub Command1_Click()
Randomize
n = Combo1.ListCount
a = Int(Rnd * n)
Combo1.ListIndex = a
Label2.Caption = "中奖的好吗为:" & Chr(13) & Combo1.Text
End SubPrivate Sub Command2_Click()
Unload Me
End Sub