为什么在执行 .Document.Open 出现"对象变量或 With 块变量没有设置(错误 91")
但继续执行的话还是可以显示的???
With WebBrowser1
.Navigate "about:blank"
.Document.Open
.Document.Write "<html>"
.Document.Write "<body>"
.Document.Write "<B>"
.Document.Write "ÎÊר¼Ò£¬Ò»¸öºÜºÃµÄÕ¾µã¡£"
.Document.Write "</B> "
.Document.Write "</body>"
.Document.Write "</html>"
.Document.Close
End With
但继续执行的话还是可以显示的???
With WebBrowser1
.Navigate "about:blank"
.Document.Open
.Document.Write "<html>"
.Document.Write "<body>"
.Document.Write "<B>"
.Document.Write "ÎÊר¼Ò£¬Ò»¸öºÜºÃµÄÕ¾µã¡£"
.Document.Write "</B> "
.Document.Write "</body>"
.Document.Write "</html>"
.Document.Close
End With
不能打开空的对象的吧
有如下代码:
Public Sub ShowPrint(xmlStream As String, xslFile As String)
Dim xmlObj As New MSXML2.DOMDocument ' XMLDocument
Dim xslObj As New MSXML2.DOMDocument
xmlObj.loadXML xmlStream
xslObj.Load xslFile
WebBrowser1.Document.Write xmlObj.transformNode(xslObj)
End Sub
执行WebBrowser1.Document.Write...那句时也提示这样的问题,但点"调试"后继续运行也会出来结果,哪个能告诉小弟怎么样解决,我加分!!!