VB数据摄取的问题
本人刚接触VB编程,就是在一个textbox中返回的值像这个“400X400X12,500X500X14”的这种相乘的形式的数据,我想将其中的400,400,12和500,500,14分别分离出来付给啊,a,b,c作接下来的编程,请问各位前辈怎么实现呢。textbox中的值是返回来的,并不是自己输入的。我自己的编程是这样的。Dim D() As String
D() = Val(Text1.Text)
Dim dest() As String
dest() = Split("D()", "×")
Dim a, b, c As Double
a = dest(0)
b = dest(1)
c = dest(2)
Text2.Text = a
dim dest() as string
dest() = Split(Text1.Text, "×")
Dim a As Double, b As Double, c As Double
a=val(dest(0))
Text2.Text = cstr(a) zzyong00 发表于 2015-4-7 21:56 static/image/common/back.gif
dim dest() as string
dest() = Split(Text1.Text, "×")
Dim a As Double, b As Double, c As Double
我的意思是要例如输入任意形式的abcXcdeXef或者abcdXefghXhi三位数乘四位数,我要分别获取其中的三位数,四位数,那用什么编程啊,谢谢啦 用Regex
页:
[1]