如何用代码点击http://www.yp.net.cn/schinese/search/SearchForm.asp的那个"查询"按钮?Private Sub Form_Load()
Web1.Navigate2 "http://www.yp.net.cn/schinese/search/SearchForm.asp"End SubPrivate Sub Web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Web1.Document.Forms(0).Item("areacode").Value = "010"
Web1.Document.Forms(0).Item("IMGBT").Click
End Sub在Web1.Document.Forms(0).Item("IMGBT").Click一句中报:实时错误"91":对象变量或with变量未设置.怎么办?
Web1.Navigate2 "http://www.yp.net.cn/schinese/search/SearchForm.asp"End SubPrivate Sub Web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Web1.Document.Forms(0).Item("areacode").Value = "010"
Web1.Document.Forms(0).Item("IMGBT").Click
End Sub在Web1.Document.Forms(0).Item("IMGBT").Click一句中报:实时错误"91":对象变量或with变量未设置.怎么办?
那个名字应该没有什么问题吧?因为是我打开网页的源代码看到就是那个名字的。
要不,名字会有什么错误呢?
请教请教!
谢谢先!