+ Reply to Thread
Results 1 to 3 of 3

VBA to open list of hyperlinks in non-default browser?

  1. #1
    Registered User
    Join Date
    07-03-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question VBA to open list of hyperlinks in non-default browser?

    Hi Everyone!

    I have a code (below) that opens a list of hyperlinks that I have on sheet "Tab" and my hyperlinks are in the excel sheet at cell A2, A3.. at 30 second intervals..
    This code runs perfectly on my default browser (Chrome) .

    I want it to do the Exact same thing on Firefox and IE without Changing my default browser.
    Hence, Yes I want the same tabs/pages open on 3 different browsers. (I have my reasons for wanting/needing this).
    I've been trying to find a simple way to code it, such as something like adding
    Dim IE As Object
    Set IE = CreateObject("InternetExplorer.Application") to the top like that.. I hope it can be simple like that, but so far it hasn't been...

    Please help, thank you very much!!

    thanks!!
    Ly

    Windows 8
    Excel 2010
    VBA knowledge : (very very basic/beginner)

    Code below:

    Sub Openlinks ()

    On Error Resume Next
    Sheets("Tab").Select

    Range("A2").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    Application.Wait (Now + TimeValue("00:00:30"))
    Range("A3").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
    Application.Wait (Now + TimeValue("00:00:30"))

    End Sub

  2. #2
    Registered User
    Join Date
    07-03-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA to open list of hyperlinks in non-default browser?

    I found a decent workaround for IE.. not firefox yet

    Sub IntExp()

    On Error Resume Next

    Dim ie As Object
    Set ie = CreateObject("InternetExplorer.Application")

    ie.Navigate Sheets("tab").Range("A2").Value
    ie.Visible = True
    Application.Wait (Now + TimeValue("00:00:30"))

    end sub

  3. #3
    Registered User
    Join Date
    07-03-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: VBA to open list of hyperlinks in non-default browser?

    So I found an answer / work around to my own question for Firefox.. you have to put the link inside with 3 """ on each side. This gets the job done.


    Sub Firefox()

    Dim objShell

    Set objShell = CreateObject("WScript.Shell")
    objShell.Run ("""C:\Program Files (x86)\Mozilla Firefox\Firefox.exe"" ""www . Hyperlink 1 .com """)
    Application.Wait (Now + TimeValue("00:00:10"))

    objShell.Run ("""C:\Program Files (x86)\Mozilla Firefox\Firefox.exe"" ""www . Hyperlink2 .com""")

    End Sub
    Last edited by Lycn; 07-16-2015 at 12:14 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. List hyperlinks on vba userform to open in Internet browser
    By Jakeyboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2015, 07:42 PM
  2. Some hyperlinks don't open in default browser
    By biznez1 in forum Excel General
    Replies: 0
    Last Post: 05-17-2013, 02:14 PM
  3. Open Multiple Hyperlinks in Default Browser
    By thelukeeffect in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-29-2011, 02:20 PM
  4. Replies: 1
    Last Post: 02-23-2010, 05:36 PM
  5. Replies: 4
    Last Post: 05-18-2006, 11:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1