把字符给数组赋值的错误!!!!!!!!!!
Dim sr As TextStream
Dim fileStr As String
Dim fso As New Scripting.FileSystemObject
CommonDialog1.ShowOpen
fileStr = CommonDialog1.filename
If fileStr = "" Then
MsgBox ("未选择文件,不能导入数据!")
Return
End If
If Not fso.FileExists(fileStr) Then
MsgBox ("文件 " & fileStr & "未找到或格式不正确!")
Return
End If
' Dim FILE_NAME As String = fileStr
Set sr = fso.OpenTextFile(fileStr)
'
' Dim sr As TextStream
Dim InputStr As String
Dim FieldsStr(35) As String '
Dim StrCode As String
Dim I As Integer
I = 0
InputStr = sr.ReadLine
' Open fileStr For Input As #1
While Not InputStr() = ""
InputStr = sr.ReadLine
If InputStr = "" Then
GoTo 90
End If
FieldsStr = Split(InputStr, ",")
'取得数组
' Try
If I = 0 Then
......
End If
End If
'插入条码信息
.......
90:
MsgBox ("记录导入成功!")