回复:请问一道简单的VB题……
这样就可以了。前提是在你的Form上有Text1~Text4、Command1、Command2这六个控件。
Private Sub Command1_Click()
Dim a As Single, b As Single, c As Single, d As Single
a = val(Text1.Text )
b = val(Text2.Text )
c = val(Text3.Text )
d = (a + b + c) / 3
Text4.Text = d
End Sub
Private Sub Command2_Click()
End
End Sub