Web Browser Object in User Form

Big Monkey

Active Member
Joined
Nov 5, 2005
Messages
255
Man, I've searched high and low on this forum and Google in general, and I can't seem to figure this one out.

I just discovered the Web Browser control in a user form and had some great ideas on how to use it.

The problem is this: My user forms have multipages. If I try to add more than one web browser, there are errors such as:

" Method 'Navigate2' of object 'IWebBrowser2' failed "

I tried eliminating all the browsers but one, but still get the same error when I go from one page to another and back and then try to run the browser again.

I think I read somewhere from MS site that this function is hosed since like IE 4.0 or something, but I could be wrong.

If I insert without using a multi-page, it seems to work well so far...but it will really limit me on what I was trying to do.

Does anyone have any help they can offer?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I want to make a multi page user form with a menu to go to different web sites.

It is meant to be a help tool for other employees. They are already using a user form I created, and I want to expand the functionality.

I know I can run code to launch individual instances of IE, but there are like 20 web links that we use frequently and I would prefer they all stay within the user form.
 
Upvote 0
So why do you need the multipage?

Couldn't you just have a combobox with the links?

By the way I don't seem to have any problem with using more than 1 web browser controls and a multi page control.
 
Upvote 0
It gives me errors using office 2000.

It doesn't do it right away, only when I tab back and forth between pages and then try to use it again.

And yes, I suppose I could use a combo box and the end result would get what I want. The thing is that I have images on the form to make it look web like and was using labels as the links with pretty mouse overs and everything. I kinda wanted to keep the same motif.
 
Upvote 0
Do you realise that if you are distributing this to other people you may have problems?

On some setups the user might not have access to the web browser control, or any 'non-standard' controls you may be trying to use.

Also do you really think a userform is the best place to display a web page?

Have you considered automating IE?

For example you could create an instance of it when the userform is opened and manipulate that eg show/hide/navigate via code.
 
Upvote 0
The workstations are all on the same floor as I am, and are all imaged exactly alike. No one changes settings in XL, so I think I'm pretty safe there as far as compatability goes...but that is definitely a good thing to be aware of.

Until now, no I hadn't thought of automating IE.

Maybe if I were to launch a web browser in Excel...and instead of having it go to a site directly...it could go to a html file on our network...and then I could code the html file to browse web pages within itself? That way I could keep my menus and styles...

Hmmm...OK well that certainly gives me some ideas....

Thanks Norie, you always help me out :)
 
Upvote 0

Forum statistics

Threads
1,223,287
Messages
6,171,203
Members
452,391
Latest member
BHG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top