+ Reply to Thread
Results 1 to 13 of 13

is there a way to redirect a hyperlink to a non-default browser ?

  1. #1
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    is there a way to redirect a hyperlink to a non-default browser ?

    I have the following situation. I am in a company environment. I cannot change the default browser. The problem with this situation is that the websites that I access via hyperlinks in Excel run inefficient in the default browser. For that reason I would like that the hyperlinks open in a browser that I specify.

    I read here that it is possible somehow to instruct Excel in a VBA to open the hyperlinks in a specified browser. But it is not explained in detail.

    If somebody knows how to script that, please explain.
    Ideally I want a modified hyperlink that opens in a specified browser. I have already written an add-in that creates these hyperlinks in one column. Therefore I would like to keep the one-column hyperlink structure.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Probably easiest way is to use the command prompt.

    For example...

    Please Login or Register  to view this content.
    starts the webbrowser chrome on google.com. This can be coded into a sub.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    how would that practically look like and work?

    Assume I have a spreadsheet with publication references.
    Each row is a reference to one paper. Each column contains various information e.g. authors, year, title, abstract
    The last column contains the hyperlink to PubMed.
    Currently when I click on the hyperlink the PubMed site with the abstract opens in the default browser.
    Ideally I would like it that instead the hyperlink opens in the browser of my choice.

  4. #4
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Hello, dschmitt

    In case of just clicking links from file it could be easier to change the default browser. If it is not possible for some reasons (or just not likely), you may create a button with a link name. This button will trigger a macro, that may activate needed browser and, by method SendKeys, you may open needed page.

  5. #5
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Rioran, if I understand you correctly, you are saying that I should create a macro that can be executed from a menu button in the ribbon. That macro will open my browser of choice and open the URL in the active Cell. Meaning that I have to select the cell with the URL before I activate the macro.

    I think that will work. Can you give me a sample script? I never used SendKeys.

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Hi,

    Try this:

    Example using Firefox and a range

    Please Login or Register  to view this content.

    Example using Chrome and active cell

    Please Login or Register  to view this content.
    Last edited by abousetta; 09-26-2014 at 07:58 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    that works. Thank you. Now I just need to figure out how to get the URL in the active cell into the browser.

  8. #8
    Forum Contributor
    Join Date
    09-26-2014
    Location
    Moscow, Russia
    MS-Off Ver
    MSE 10, MSE 13
    Posts
    179

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Just replace

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    I am sorry. I was distracted with another work. That's why I didn't notice "Cells(1, 1).Value" in the script. While sidetracked I focused on just opening Chrome.
    Thank you very much. The problem is solved.

  10. #10
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    Hi,

    Glad you got it working. I had to get some sleep as it was already 3 AM my time.

    On a side note, if you're doing a lot of work with pubmed, then I would suggest you take a look at using their xml site. It's much faster than the html site and is more versatile for programming purposes. There is a bit of a learning curve to understanding how to deal with it, but if you are mining data from pubmed on a regular basis (or the volume is large) it might be worth investing some time with it.

    Anyways, thanks for the rep and marking the thread as solved.

    abousetta

    P.S. I'll add as second example using chrome and the activecell just in case someone finds this thread and doesn't know what to change.

  11. #11
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    abousetta, I actually use Scopus. I mentioned PubMed because I thought that more people know PubMed. But, thank you for the information. Who knows, in the future I may have to rewrite my software to retrieve data from PubMed instead of Scopus.

  12. #12
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    I've started to scrape data from scopus, but never finished the project. If you've posted your code somewhere or willing to share I would love to take a look at it.

  13. #13
    Valued Forum Contributor
    Join Date
    02-21-2010
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2007
    Posts
    502

    Re: is there a way to redirect a hyperlink to a non-default browser ?

    About 4 years ago we ask ourselves how to find KOLs for specific bio research areas. I though that this information could be extracted from any publication DB and that the analysis of the publication data could be done in Excel. KOL publish a lot and are cited a lot. This is how I got started with Excel VBA programming. I could build on a couple semester worth of Turbo Pascal programming which I took 25 years ago. I learned VBA while doing. I am still at the basic level although I wrote a lot of code by now. If you look at all my post you can probably piece together what I was building. Basically I learned VBA from people on this forum. I take this opportunity to thank everybody. This forum is just wonderful.

    Based on the KOL Excel add-in I created a Excel VBA add-in that is similar to EndNote. I wanted something that is simpler and better in sharing than EndNote. On top of that I created some text mining VBA macros that allow me to more quickly sort through a large number of publications. This comes in handy when you are trying to determine whether a gene which you just came across in one disease area really has the potential for a new drug target. To determine that you have to look at the whole publication record for that gene/protein. This can be daunting when you are dealing with several hundred to a thousand publications.

    What I usually do is I do a gene/protein oriented search in Scopus (html site), can be wide, can be refined, and then export the publications as a CSV file. Subsequently I import the CSV file into Excel and rearrange and analyse the data as needed. I chose Scopus for convenience and legal reasons. It was the best DB available to me.

    Sharing the code is difficult because the code is very long. But the code is not difficult. A beginner to intermediate level VBA programmer can write that code. The key was to become clear about what the output data was supposed to be and how it should be presented. All I then had to do was move things around and count. But if you have specific question about how I did certain things I am more than willing to share that information including script.

+ 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. Open hyperlink with Firefox when IE is default browser?
    By Haze1434 in forum Excel General
    Replies: 2
    Last Post: 03-04-2014, 10:16 AM
  2. Initializing Default Browser
    By billyshears in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2013, 05:18 PM
  3. Any way to make Excel use a non-default browser?
    By Delta223 in forum Excel General
    Replies: 2
    Last Post: 07-30-2010, 03:00 AM
  4. Replies: 4
    Last Post: 05-18-2006, 11:25 PM
  5. Default browser for web querys?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-09-2005, 08:06 AM

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