vb截取本地txt中某两个指定字符之间的字符串

2024-12-17 17:28:23
推荐回答(1个)
回答1:

Dim s() As String, s1() As String
Open "数据.txt" For Binary As #1
s = Split(Input(LOF(1), #1))
Close #1
s1 = Split(s(1), ",") '第一行为s(0),第二行为s(1),依此类推
Text1.Text = s1(0)
Text2.Text = s1(1)
Text3.Text = s1(2)
Text4.Text = s1(3)
Text5.Text = s1(4)