txt文件格式如下:
序号 条码 数量
1 10011 , 12
2 19910 , 11
内容中和空格还不确定。
怎样存入相应的字段内?
谢谢大家了想了很久都没有想出来只好求助了!
Private Sub cmdOKA_Click()
Dim ReadFile As String
Dim FileNum As Long
Static I As Integer
Dim J, K As Integer
FileNum = FreeFile
Open "D:\080616.txt" For Input As FileNum
' K = 1
Do While Not EOF(FileNum)
Line Input #FileNum, ReadFile
Print ReadFile
' If I <> 0 Then Load txtText(I)
'
' txtText(I).Move 135, 200 + 500 * I
' txtText(I).Text = I
' txtText(I).Visible = True
' txtText(I) = txtText(I) & ReadFile
' J = InStr(K, txtText(I).Text, " ")
' Print Left$(txtText(0).Text, J)
' I = I + 1
' K = J
Loop
' J = InStr(J + 3, txtText(0).Text, " ")
' Print Left$(txtText(0).Text, J)
Close #1
End Sub