• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 759
  • Last Modified:

How do I open a Firefox browser window, and only a Firefox browser window, from within Access 2003 using VBA?

My company has a web page that not only works best, but on some platforms works only, with Firefox. My access 2003 project needs to access that web page but the code I'm using opens Microsoft IE by default. How do I access that page with Firefox, no matter what default browser is set on any given PC? It needs to be a user-interactive browser page, not just data retrieval from the web page, so just opening a browser window is all I need.

Code:
Dim urlData as String
Dim urlHTTP as String
Dim DataList as String
Dim browser as SHDocVw.InternetExplorer        'This is probably where I need to start changing my code?
Dim objVph, objBrowserPage as DataObject
...
DataList = {search term... calculated earlier}
Set browser = New SHDocVw.InternetExplorer
urlData = "http://.../processRequest?HTMLVersion=5.0&loc=en_US&tracknum=" & DataList
browser.navigate (urlData)
browser.resizable = True
browser.Visible = True
...
0
BruceYounggreen
Asked:
BruceYounggreen
2 Solutions
 
LucasCommented:
You can execute a shell command to open fire fox and specify which URL to open

This is my command, i'm running a 64 bit machine just remove the (x86):

Shell ("C:\Program Files (x86)\Mozilla Firefox\firefox.exe http://kb.mozillazine.org/Command_line_arguments")
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Just a sidenote:

As lucas911 indicates, Firefox is not VBA-enabled, so you really cannot work with it the same was you do Internet Explorer. You can use Shell, as suggested above, but that's about as close as you can get from VBA.

You might be able to use the Mozilla ActiveX control: http://www.iol.ie/~locka/mozilla/control.htm. Note this is NOT certified to work in VBA, but the site does give code to work with VB6, which generally works ok with VBA. However, be aware that not all ActiveX controls work reliably in Access, and if you intend to deploy this to other users you'll have to insure that you install the ActiveX control on those machines.

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now