WebBrowserコントロールに動的に生成したHTMLを
表示したいのですが、最後の行でエラーになってしまいます。
WebBrowserコントロールに生成したHTMLDocumentを
設定するにはどうしたらいいでしょうか?

Dim doc As New MSHTML.HTMLDocument
Dim html As MSHTML.HTMLHtmlElement
Set html = doc.createElement("html")
Dim head As MSHTML.HTMLHeadElement
Set head = doc.createElement("head")
Call html.appendChild(head)
Dim body As MSHTML.HTMLBody
Set body = doc.createElement("body")
Call html.appendChild(body)

Set WebBrowser1.document = doc