Looking for vba code that will chose IE over Firefox browser

Is there a way to set which browser to be used, no matter which the user has set as default using vba?

Karen
Karen SchaeferBI ANALYSTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
try this codes

Dim iz As New InternetExplorer
iz.Navigate "http://www.msn.com"
iz.Visible = True


add to your references the Microsoft Internet Controls library
c:\windows\system32\shdocvw.dll
rockiroadsCommented:
Are you wanting to view web pages within your forms or are you calling browsers?
you can create a browser control within a form then load pages in there. This browser control is based on IE so this is one sure way to control it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Karen SchaeferBI ANALYSTAuthor Commented:
I have a internal web based program and is required to use IE and not Firefox.

so I Have a url that opens the webpages, but need to limit the browser.

Thanks for the suggestion Rey I will give it a try.

karen
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Jeffrey CoachmanMIS LiasonCommented:
<I Have a url that opens the webpages>
Then you will have to tell us how to Access the URL string...

In any event, here is another technique.

Dim retval As Variant
retval = Shell("C:\Program Files\Internet Explorer\iexplore.exe " & Me.txtWebsite, vbNormalFocus)

In this case, you must know the location of the IE Executable on the host PC.
The website is taken from a textbox control (or a variable)

Again, just another technique to try, depending on your requirements.

;-)

JeffCoachman
Rey Obrero (Capricorn1)Commented:
k,
did you try the code i posted at http:#a33932304 
Karen SchaeferBI ANALYSTAuthor Commented:
for now this is what I am using - but it relies on the default browser.

        Application.FollowHyperlink ("https://askbert.web.123.com/Brio/personalpages/?url=%2FBrio%2Fpersonalpages%2F&originServlet=BrowserAppName")
        Application.FollowHyperlink ("T:\BERT Data")
        ValidateLinkTable ("ILP_AllEmpTraining_Data")

when I tried Rey's code - I not sure what the path would be to Open IE and MSN.

iz.Navigate "C:\Program Files\Internet Explorer\IEXPLORE.EXE"
iz.Visible = True
     
i based the filepath on the shortcut on my desktop, but when used in the code it ask to be downloaded.  How should I proceed?

K

Karen SchaeferBI ANALYSTAuthor Commented:
Rockiroads,

Please elaborate more on this approach.

"you can create a browser control within a form then load pages in there. This browser control is based on IE so this is one sure way to control it."

K


Rey Obrero (Capricorn1)Commented:
k,

if you just copied the code i posted, it will open msn.com

why do you need to change the code without trying the original code posted

what is the URL of the page you want to open?

paste it here...

Dim iz As New InternetExplorer
iz.Navigate "http://www.msn.com"
iz.Visible = True

just change ""http://www.msn.com" to the URL you want to open














Karen SchaeferBI ANALYSTAuthor Commented:
Rey,

It opens the MSN but then turns around and still wants to open my hyperlink in Firefox (which is my default).

So now I have both MSN open in IE and Firefox open at the same time but the hyperlink for the actual website I need open in Firefox but I can actual use that to processes the data - Since Bert does not work correctly in FIrefox.  Is there a way to overwrite the default value within the hyperlink, like you can in the properties of an Icon?

K
Karen SchaeferBI ANALYSTAuthor Commented:
Or is there a way to force it to be the active browser prior to running the hyperlink?

K
Karen SchaeferBI ANALYSTAuthor Commented:
Ok Rey,

Once I eliminated the "Application.FollowHyperlink " portion of the code yours worked with my hyperlink.

Thanks,

However, I would like to attempt using Rockiroads method of having the form open within Access.

After trying the embedded method it works better for my needs - thanks to all for the input.

found a good example on how to embed the ActiveX control and uses at

http://www.databasedev.co.uk/access_web_page_viewer.html

Thanks,

K
Karen SchaeferBI ANALYSTAuthor Commented:
Thanks for the great assist.

K
rockiroadsCommented:
Hi Karen. I missed your posts cos I had to pop out. I assume your all sorted now. Good luck with the rest of your project!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.