Private Sub CommandButton4_Click() Me.Label2.Caption = Me.Label2.Caption + 1 n = Int(Rnd * 3) If n = 0 Then MsgBox "電腦出剪刀您輸了" End If If n = 1 Then MsgBox "電腦出石頭您贏了" Me.Label1.Caption = Me.Label1.Caption + 1 End If If n = 2 Then MsgBox "電腦出布平手" End If End Sub