Private Sub Command1_Click()
Select Case a '判断a变量
Case 1 '如果是1就显示金
Text2.Text = "金"
Case 2 '如果是2就显示木
Text2.Text = "木"
Case 3 '如果是3就显示水
Text2.Text = "水"
Case 4 '如果是4就显示火
Text2.Text = "火"
Case 5 '如果是5就显示土
Text2.Text = "土"
End Select '结束这ㄍ判断
Command1.Enabled = False
If a = 2 Then
Text1.Text = "电脑-20%血量!"
Else
If a = 4 Then
Text1.Text = "玩家-20%血量!"
Else
If a = 1 Then
Text1.Text = "平手"
Else
If a = 3 Then
Text1.Text = "平手"
Else
If a = 5 Then
Text1.Text = "平手"
End If
End If
End If
End If
End If
End Sub
Private Sub Command6_Click()
Randomize
Dim t(5) As Integer
For i = 1 To 5
ReNumber:
t(i) = Int(Rnd * 5) + 1
For j = 1 To 5
If i <> j And t(i) = t(j) Then GoTo ReNumber:
Next
Next
a = t(1)
b = t(2)
c = t(3)
d = t(4)
e = t(5)
End Sub
我先按 按钮六 在按 按钮一 为什么抓不到 a的值
要怎样才能抓到呢@@?