HTML in a WebBrowser control without a file


HTML in a WebBrowser control without a file

Add this code to a Form1:

Option Explicit

Private Sub Form_Load()
Web1.Navigate “about:blank”
End Sub

Private Sub Web1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim doc As HTMLDocument
Set doc = web1.Document
doc.body.innerHTML = “This is really cool I LOVE THE IE DOM!!”
End Sub

4 responses to “HTML in a WebBrowser control without a file

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s