2、取消了清除按钮,因为出题按钮可以取代它。
3、代码说明:
Dim a1, a2 申明变量
-----------------------------------
Private Sub CommandButton1_Click()
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
Image1.Visible = False
Image2.Visible = False 以上代码用于变量初始化
a1 = Int(100 * Rnd)
a2 = Int(100 * Rnd) 以上代码用于获取变量随机值
TextBox1.Value = a1
TextBox2.Value = a2 给文本框赋值
End Sub
---------------------
Private Sub CommandButton2_Click()
If Int(TextBox3.Value) = a1 + a2 Then
Image1.Visible = True
Else
Image2.Visible = True
End If 判断结果以反馈图片
End Sub
-------------------------
If a2 > a1 Then
t = a2
a2 = a1
a1 = t
End If 此判断语句是为确保被减数大于等于减数
(2008-03-25 11:06:29, Size: 165 KB, Downloads: 153)