Karen Schaefer
asked on
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
<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
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
k,
did you try the code i posted at http:#a33932304
did you try the code i posted at http:#a33932304
ASKER
for now this is what I am using - but it relies on the default browser.
Application.FollowHyperlin k ("https://askbert.web.123.com/Brio/personalpages/?url=%2FBrio%2Fpersonalpages%2F&originServlet=BrowserAppName")
Application.FollowHyperlin k ("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
Application.FollowHyperlin
Application.FollowHyperlin
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
ASKER
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
ASKER
Or is there a way to force it to be the active browser prior to running the hyperlink?
K
K
ASKER
Ok Rey,
Once I eliminated the "Application.FollowHyperli nk " 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
Once I eliminated the "Application.FollowHyperli
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
ASKER
Thanks for the great assist.
K
K
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!
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\shdocv