2
我想解析存储在文件路径中的每一行文本文件到我的字符串数组中。但是,看起来我是由除换行符之外的其他字符(例如,逗号)分隔的。有没有一种方法只用新的行字符进行解析?预先感谢您的指导。VBA:分隔符输入关键字
'Open filepath For Input As #1
Do While Not EOF(1)
Input #1, script(numlines)
numlines = numlines + 1
If numlines = maxlines Then
maxlines = maxlines + 100
ReDim script(maxlines)
End If
Loop
' Close file
Close #1
谢谢。那就是诀窍。不知道VBA这么好(更不用说我搁置2年后生锈了)。顺便说一句,酷网站。 – stanigator