问题描述:
在VB 语句中 x = Val(Text1.Text) Val
Dim y As Integer
Private Sub Command1_Click()
Text2.Text = y
End Sub
Private Sub Text1_Change()
x = Val(Text1.Text)
If x < 0 Or x > 100 Then
Text1.Text = ""
Text1.SetFocus
Label1.Caption = "请重新输入"
Else
Label1.Caption = "输入正确"
y = x
End If
End Sub
Val 还有 Else
Dim y As Integer
Private Sub Command1_Click()
Text2.Text = y
End Sub
Private Sub Text1_Change()
x = Val(Text1.Text)
If x < 0 Or x > 100 Then
Text1.Text = ""
Text1.SetFocus
Label1.Caption = "请重新输入"
Else
Label1.Caption = "输入正确"
y = x
End If
End Sub
Val 还有 Else
问题解答:
我来补答展开全文阅读