按钮事件,产生随机数并取整和a对比

Private Sub Command15_Click()
a = Val(Text11)
Text13 = Int((Rnd() * 6 + 1))

If a = Text13 Then
MsgBox "恭喜你,中奖了"
Else
MsgBox "没中奖,再试试吧"

End If
End Sub