嗨我想从网站上的固定位置抓取一个值。我的代码是:
-1 == true
我想从以下代码中提取“1.1”,但是得到运行时错误438.我知道我的错误在代码“myValue = allRowOfData.Cells(1).innerHTML “但是通过VBA抓新手我不知道我做错了什么。我已经无缘无故地搜索了这个问题。感谢任何指导,谢谢
Dim appIE As Object
Set appIE = CreateObject("internetexplorer.application")
With appIE
.navigate "http://www.conferenceboard.ca/"
.Visible = True
End With
Do While appIE.Busy
DoEvents
Loop
Set allRowOfData = appIE.document.getElementById("product_cols_2")
Dim myValue As String: myValue = allRowOfData.Cells(1).innerHTML
appIE.Quit
Set appIE = Nothing
Range("A1").Value = myValue
End Sub