split函数就能做到 首先先申请一个字串数组 比如你有一个字符串STR,里面有“AAA,BBB,CCC” 然后要拆成AAA BBB CCC分到三个变量里 就这样:dim a(0 to 2) as string a=split(STR,",") 于是你再去看a数组,就变成这样了: a(0)="AAA" a(1)="BBB" a(2)="CCC"
〆剩余的表白
2024-05-30 10:49:11
Private Sub Command1_Click() Dim a As String, b As Variant a = Text1.Text b = Split(a, " ") Text2.Text = b(0) Text3.Text = b(1) Text4.Text = b(2) Text5.Text = b(3) End Sub 这个可以满足人的要求吧