主题:这段代码不知道哪出错了,盼高手帮忙
下面是个股票收益计算器,这段代码不知道哪出错了,盼高手直接给个正确的,我不太懂。
Private Sub 计算_Click(Index As Integer)
Dim a, b, c As Double
a = Val(Text1.Text)
b = Val(Text2.Text)
c = ((Val(b) - Val(a)) / Val(a)) * 100
End Sub
[img]http://hiphotos.baidu.com/zhidao/abpic/item/ae51f3de0fe86c0094ee37d8.jpg?t=1300001165835[/img]
Private Sub 计算_Click(Index As Integer)
Dim a, b, c As Double
a = Val(Text1.Text)
b = Val(Text2.Text)
c = ((Val(b) - Val(a)) / Val(a)) * 100
End Sub
[img]http://hiphotos.baidu.com/zhidao/abpic/item/ae51f3de0fe86c0094ee37d8.jpg?t=1300001165835[/img]