@[007刘哲宇](/user/88343) VB不是高中信息技术的?(现在新教材除外,现在是Python)
by fresh_boy @ 2020-10-24 17:36:43
```
Private Sub Command1_Click()
b = Val(Text1.Text)
If ch = 1 Then
Text3.Text = Str(a + b)
ElseIf ch = 2 Then
Text3.Text = Str(a - b)
ElseIf ch = 3 Then
Text3.Text = Str(a * b)
ElseIf ch = 4 Then
Text3.Text = Str(a / b)
End If
End Sub
```
by fresh_boy @ 2020-10-24 17:38:46
@[唱歌的向日葵](/user/225100) 是这样的啊~谢谢
by 007刘哲宇 @ 2020-10-24 18:22:50
@[007刘哲宇](/user/88343) Text属性是字符串,a+b你这里要转成字符串
by fresh_boy @ 2020-10-24 18:30:06