KeyFC欢迎致辞,点击播放
资源、介绍、历史、Q群等新人必读
KeyFC 社区总索引
如果你找到这个笔记本,请把它邮寄给我们的回忆
KeyFC 漂流瓶传递活动 Since 2011
 

请问一道简单的VB题……

[ 7923 查看 / 25 回复 ]

回复:请问一道简单的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
分享 转发
TOP