![]() |
excel webbrowser
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 |
excel webbrowser
Hi Mark,
Here is a link that has a video and project example for the WebBrowser ActiveX control: http://www.everythingaccess.com/tuto...ctiveX-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 "Mark HOlcomb" wrote in message ... 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 |
excel webbrowser
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 "Chris" wrote: Hi Mark, Here is a link that has a video and project example for the WebBrowser ActiveX control: http://www.everythingaccess.com/tuto...ctiveX-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 "Mark HOlcomb" wrote in message ... 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 |
All times are GMT +1. The time now is 09:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com