VBA MACRO EXCEL错误未将数据提取到Excel中

时间:2017-03-27 18:58:58

标签: excel vba excel-vba

我脚本中的这一行会引发错误。 并且我也为你提供了相应的html,以便分析在html中给出的描述属性,并且它也不接受带有点(。)的html id属性

宏观VBA -

searchtxt.Value = "Earth"

.document.forms(0).submit

Do While .Busy
DoEvents
Loop

Do While .readyState <> 4
DoEvents
Loop

ThisWorkbook.Sheets(1).Range("A2") = "hgvgjjlj"

Set doc = .document
Set searchres = doc.getElementById("description").innerText
ThisWorkbook.Sheets(1).Range("A1").value = searchres

HTML -

<textarea onblur="this.isFocused=false;" 
onkeydown="multiKeyDown(this);" 
onfocus="this.isFocused=true;" 
onchange="this.isFocused=false;multiModified(this)" 
data-charlimit="false" 
data-length="4000" 
spellcheck="true" 
name="u_incident_task.description" 
style="width: 100%; overflow: hidden; word-wrap: break-word; resize: none; height: 356px;" 
id="u_incident_task.description" 
wrap="soft" specialtype="" class="form-control">Description:
Description xyz asdfghvb</textarea>

0 个答案:

没有答案