Hi all. I am trying to load a html code directly in to webbrowser control but i get this error:
pointing to this line:run-time error '91'
object variable or with block variable not set
could you guys tell me how to fix it.ThanksWebBrowser2.Document.body.innerhtml = html1
Code:Private Sub Command4_Click() Dim html1 As String html1 = "<html>" & _ "<object classid='clsid:D27CDB6E-AE6D-11cf-44B8-555553540000' id='cameo' width='300' height='250' codebase='http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab' wmode=""transparent"">" & _ "<param name='movie' value='http://www.somesite.com/viewer300x250.swf' />" & _ "<param name='quality' value='high' />" & _ "<param name=""wmode"" value=""transparent"" />" & _ "<param name='bgcolor' value='#000000' />" & _ "<param name='FlashVars' value='id=" & Text2.Text & "&audio=off&theme=1' />" & _ "<param name='allowScriptAccess' value='always'/> <param name='allowNetworking' value='all'/>" & _ "<embed name='cameo' width='300' height='250' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer' src='http://www.somesite.com/viewer300x250.swf' quality='high' bgcolor='#000000' FlashVars='id=" & Text2.Text & "&audio=off&theme=1' allowScriptAccess='always' allowNetworking='all' align='middle' play='true' loop='false' quality='high' wmode=""transparent"">" & _ "</embed>" & _ "</object>" & _ "</html>" WebBrowser2.Document.body.innerhtml = html1 Text3.Text = html1 End Sub


Reply With Quote