Help with InvalidActiveXStateException and AxWebBrowser

morgandoyle

New member
Joined
Nov 23, 2005
Messages
3
Programming Experience
5-10
I am trying to write an app that will have multiple browsers depending on the users configuration. Everything works fine until I try to set the Navigate property. Then the dredded "InvalidActiveXStateException" shows up. Below is the code. I also need to know how I can reference each browser control to change urls seperatly. HELP!!! My head hurts from hitting it on the wall.

For i = 1 To NumScreens
Dim urlbrowser As New AxSHDocVw.AxWebBrowser
If i = 4 Then
BrowserTop = BrowserHeight + 5
BrowserLeft = 0
End If
urlbrowser.Left = BrowserLeft
urlbrowser.Top = BrowserTop
urlbrowser.Width = BrowserWidth - 2
urlbrowser.Height = BrowserHeight - 5
urlbrowser.PutProperty("Name", "Browser" & i)
Me.Controls.Add(urlbrowser)
' this is where is gets the error
urlbrowser.Navigate(NavList(i, 0))
BrowserLeft = BrowserLeft + BrowserWidth + 2
Next


 
Back
Top