VB中,把数据放入text 里时 程序报错溢出 怎么改!程序如下,在线等待解答 。 10
PrivateSubForm_Load()IfForm1.Option1.ValueThens=0DoWhilej=Val(Year(Now))Fori=Val(Mont...
Private Sub Form_Load()
If Form1.Option1.Value Then
s = 0
Do While j = Val(Year(Now))
For i = Val(Month(Now)) To 12
k = 1
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
s = s + n
List1.AddItem j & "年" & i & "月:" & n
Print
k = k + 1
Next i
Loop
Print
sum = s
For j = Val(Year(Now)) + 1 To Val(Year(Now)) + e - 1
For i = 1 To 12
k = k
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
sum = sum + n
List1.AddItem j & "年" & i & "月:" & n
Print
k = k + 1
Next i
Next j
sum = sum
Do While j = Val(Year(Now)) + e
For i = 1 To Val(Combo3.Text) - 1
k = k
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
sum = sum + n
List1.AddItem j & "年" & i & "月:" & n
Print
k = k + 1
Next i
Loop
Text1.Text = sum
Text2.Text = sum / (10000*a)
End If
End Sub
倒数第三句报错~溢出 展开
If Form1.Option1.Value Then
s = 0
Do While j = Val(Year(Now))
For i = Val(Month(Now)) To 12
k = 1
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
s = s + n
List1.AddItem j & "年" & i & "月:" & n
k = k + 1
Next i
Loop
sum = s
For j = Val(Year(Now)) + 1 To Val(Year(Now)) + e - 1
For i = 1 To 12
k = k
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
sum = sum + n
List1.AddItem j & "年" & i & "月:" & n
k = k + 1
Next i
Next j
sum = sum
Do While j = Val(Year(Now)) + e
For i = 1 To Val(Combo3.Text) - 1
k = k
m = 10000 * a / b * (k - 1)
n = 10000 * a / b + (10000 * a - m) * 0.05 / 12
sum = sum + n
List1.AddItem j & "年" & i & "月:" & n
k = k + 1
Next i
Loop
Text1.Text = sum
Text2.Text = sum / (10000*a)
End If
End Sub
倒数第三句报错~溢出 展开
展开全部
Text2.Text = sum / (10000*a)
改为
Text2.Text = sum / (10000 * a)
改为
Text2.Text = sum / (10000 * a)
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我这边调试a 和sum的值都是0 不知道你要实现什么功能
更多追问追答
追问
房屋按揭还款的功能 a ,b 的值上个窗体的输入值
房屋按揭还款的功能 a ,b 的值上个窗体的输入值
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询