Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果这一行:
If InStr(1, vItem, ":") > 0 Then
不符合条件,接下来将执行此行
vItem = Split(str1, Chr(34))
这实际上试图拆分为空str1 variable。结果,您的 Array 为空,导致 Run-time error'9'引用下一行的右侧部分:
str1 variable
Run-time error'9'
xlobj.Range("E" & i + 1).Value = vItem(0)
所以,VItem(0)是你的问题,而它不存在。
VItem(0)