我对VBA相对来说是个新手,我正试图把一个从网络抓取中得到一个特定号码的msgbox放在一起,但是我总是遇到一个运行时错误'91‘,我根本想不出如何解决这个问题。我已经搜索了无数的堆叠溢出问题,youtube视频和一般的谷歌搜索,但没有成功地发现我自己的错误。doc.getElementsByClassName("summarydisplaycrd")(0).innerText 'here is where the run time error occurs
MsgBox c
Set Elements = Nothing
On Error Resume Next当我调试时,我得到了错误的运行时错误'91':Object variable or With block variable not set at line title = Element.Children(1).innerText请帮助我解决这个问题如果我使用Set title = Element.Children(1).in
当我试图执行这段代码时,它一直运行到第一个文档,在第二个文档中,它以错误Run-time Error 91 : Object variable or With block variable not set我不知道是什么导致了这个错误(是Dim变量还是带块的)。如果有人能帮我纠正这个错误,我会非常感激的。