Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)    Dim vDoc, vtag As Object
    Set xobj = pDisp
    Set vDoc = xobj.Document    For i = 0 To vDoc.All.length - 1 
        
End SubFor i = 0 To vDoc.All.length - 1 
这行在xp中运行正常,但在win98运行就显示说"对象变量或with块没定义"怎么解决??

解决方案 »

  1.   

    Set vDoc = xobj.Document
        ^^^^ 使用前判断 is nothingnext 跑哪去了
      

  2.   

    没装offices,后面的语句我省略了,没写出来,在win98调试时就说for 这一句出错
      

  3.   

    to 打死我也不说:
    怎么判断is nothing?
      

  4.   

    Dim vDoc, vtag As Object
        Set xobj = pDisp
        Set vDoc = xobj.Document
        if vDoc is nothing then
        end if