SHDOCVW in Worksheet

D

Dag

Help I am having issues adding a webbrowser on a worksheet. The object gets
created ok and I can browse but, when I switch to a different worksheet Excel
gets an exception error and closes. I seems like it works ok for small
webpages but bigger ones blow up excel.

I am running Excel 2003 and IE6 sp2

Here is the code I am using:

Function testWebFunc()
Dim browawe As New SHDocVw.InternetExplorer
Set browawe = ActiveSheet.OLEObjects.Add(ClassType:="Shell.Explorer.2",
Link:=False, _
DisplayAsIcon:=False, Left:=0.75, Top:=50,
Width:=Application.ActiveWindow.Width - 50, Height:=2000 _
).Object
browawe.Navigate "http://google.com"
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top