在yahoo 知識+ 看到人問:猜猜樂怎寫;於是寫了一下,和大家分享:
Private Sub Command1_Click(Index As Integer)
Dim ichk As Integer
Dim ibut As Integer
ichk = Int(4 * Rnd) + 1
ibut = Index + 1
If ichk = ibut Then
MsgBox "恭喜妳,猜對了"
Else
MsgBox "很抱歉,猜錯了"
End If
End Sub
沒有留言:
張貼留言