excel webbrowser

G

Guest

Just discovered this control! It is giving me problems and I cant find any
help.
I have a multitab (2 tabs) form with the second being a WebBrowser.navigate
reference. The web page opens fine. I return to the first tab .. then back
to the web tab and it is blank. After that it I get errors 80004005 which
means I goofed somwhere I guess. This is all of the code i have generated
to try and close and reopen the WebBrowser pushing buttons and going back and
forth between the tabs. I still get errors.

Private Sub CommandButton2_Click() 'tab1 button goes to tab2 webbrowser
WebBrowser1.Navigate "I:\blevins\flutter\Foilsim1\Foil.html"
UserForm1.MultiPage1.Value = 1 'reveal the second tab (0,1)
End Sub

Private Sub CommandButton3_Click() 'tab2 button returns me to tab1 data sheet
WebBrowser1.Quit
UserForm1.MultiPage1.Value = 0 'reveal the first tab (0,1)
End Sub

Is there a proper way to close and restart a webbrowser? I have tried .quit
and .stop with no success. I can't seem to get it. I cant seem to crack
this one.
Appreicate any expert advice ...

Thanks,
Mark
 
C

Chris

Hi Mark,

Here is a link that has a video and project example for the WebBrowser ActiveX control: http://www.everythingaccess.com/tutorials.asp?ID=Google-Eye-(Using-the-Web-Browser-ActiveX-Control) The example is in Access, but should apply just the same.

I have went through all the motions here on my machine and get the same errors as you.

The one thing I'm sure of is the .quit method isn't something you want to do until you are done with the user form i.e. put it in the terminate event of the form.

I'll continue to look for a solution.

Chris
 
G

Guest

Thanks for the reply Chris.
That example/tutorial has given somthing new to try.
The one thing I didnt mention (and it might mater) is that I am looking at a
..html file on my local drive that is full of controls and such. I will try
and 'terminate' it prior to doing anything else.

Mark
 

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

Similar Threads

Passing references 1

Top