我同意他的方法Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer 'a b c 为随机变量 dim abc as String 'abc为组合号码 a = Int(Rnd * 9) + 1 b = Int(Rnd * 9) + 1 c = Int(Rnd * 9) + 1 abc=a & b & c '组合中奖号码 '假设3到10等奖为003,004......,010 If a = 001 Then MsgBox "你中了1等奖!", vbOKOnly, "系统提示" End if If a = 002 Then MsgBox "你中了2等奖!", vbOKOnly, "系统提示" End if ...... ...... If a = 010 Then MsgBox "你中了10等奖!", vbOKOnly, "系统提示" End if End Sub
|