VB运行时出现"实时错误6 溢出"是怎么回事?
发布网友
发布时间:2024-10-08 00:23
我来回答
共1个回答
热心网友
时间:2024-10-08 00:23
'数字太大 把所有Integer换成Long就可以了,像下面这样 integer范围最大是32767,long的范围是21亿
Private Sub bOk_Click()
Dim bb As Long
bb = test(2342342)
MsgBox (bb)
End Sub
Function test(a As Long) As Long
Dim b As Long
b = a * 100
test = b
End Function