| 发表于:2007-04-10 21:22:542楼 得分:10 |
'说明:根据你的问题,看来只提取字符串出现的第一个数字值字符串,即忽略后面可能出现的数据值串,具体实现如下: function getnumeric(strtext as string) as long dim i as integer,strlen as integer strlen=len(strtext) for i=1 to strlen getnumeric=val(mid(strtext,i)) if getnumeric> 0 then '说明已解析到数值字符串 exit for end if next end function | | |
|