使用下面的代码时,我得到运行时溢出异常:VB 6 - 溢出异常 - 使用Val()函数的运行时错误
我的应用程序在visual basic 6.0中。
Private Sub Command1_Click()
Dim strItn As String
strItn = "1d998" 'when strItn has '1d998' then only error comes
If Val(strItn) = 0 Then
MsgBox ("test1")
Else
MsgBox ("else")
End If
End Sub
谢谢@GSerg。使用Val()从该字符串值获取数值的任何方法? –
该字符串的数字值有998个零。你打算如何处理它,你将在哪里存储它? – GSerg
我明白了。谢谢@GSerg。 –