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

Posted on 2011-10-07
Last Modified: 2012-05-12
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.

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
Question by:BruceYounggreen
    LVL 13

    Assisted Solution

    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")
    LVL 84

    Accepted Solution

    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: 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.


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now