1
它在循環顯示「詳細信息藍色」類名時一直失敗,我想要獲取附加圖像等數據。Excel Vba,無法循環顯示文本列
Do While (.Busy Or .readystate <> 4)
DoEvents
Loop
For Each ele In .document.all
If ele.classname = "details_title" Then
RowCount = RowCount + 1
sht.Range("A" & RowCount) = ele.innertext
ElseIf ele.classname = "details blue" Then
i = 1
For x = 0 To ele.Length 'error at this line
i = i + 1
sht.Cells(RowCount, i).Value = ele.Item(x).innertext 'error at this line
Next x
End If
Next ele
=
具有u嘗試ele.innertext –
該頁面有多個classname = details藍色,我需要收集所有的innertext,如果我使用「ele.innertext」它只會得到最後一個 – user3164150
你試過了嗎?For x = 0 To(ele.Length- 1))' –