Loading
Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports



Results 1 to 8 of 8

Thread: Open Hyperlinks Automatically in Excel into Google Chrome

  1. #1
    Join Date
    4th September 2012
    Posts
    4

    Open Hyperlinks Automatically in Excel into Google Chrome

    I need to check 2,000 hyperlinks in an Excel workbook so wanted to see if there is a way to open them automatically into Google Chrome (I wouldn't do all of them at once, probably batches of 50 or so). I tried the macro from this forum: http://forums.techguy.org/business-a...nce-excel.html which opened the hyperlinks in Internet Explorer (and massively crashed my computer into the bargain) so I was hoping there would be a way to open them in a different browser, ie Chrome.

    Thanks,

    Ben

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    1st September 2010
    Posts
    10,362

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    Unfortunately, you cannot automate Chrome using VBA as you can IE. Best you can do is something like
    Code:
    shell("C:\Users\USERNAME\AppData\Local\Google\Chrome\Application\Chrome.exe -url http:google.co.uk")   '// Or the address from your hyperlink

    You don't say what you want to do once the page is opened - so that's the general code above. There's not a lot more you can do with it, though.

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    4th September 2012
    Posts
    4

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    Once the page is loaded I want to check prices and/or see if a product is out of stock (or indeed if it just gives a 404 error). How would I use that bit of VB you've mentioned to open lots of hyperlinks at once? I'm sorry if that's a bit of an amateur question...! Thanks for your response!

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    1st September 2010
    Posts
    10,362

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    The code snippet I posted simply uses the standard Shell command to start a browser and navigate to a page. You cannot directly manipulate the data on that page, and, as I mentioned, you cannot automate Chrome with VBA - as far as I'm aware...

    You'll make your life a whole lot simpler if you use IE for this.

    Try this (as a sampler)
    Code:
    Public Sub Navtest()
    Dim ie as Object
     
    Set IE = CreateObject("InternetExplorer.Application")
    ie.visible = true
     
    Dim x as integer
    Dim links as Hyperlinks
    Set links = ActiveSheet.Hyperlinks
     
    For x = 1 to links.count
    ie.navigate links.item(x).address,nothing, "_blank"
    next
     
    End Sub
    Run it with the sheet containing the hyperlinks as the activesheet.

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    1st September 2010
    Posts
    10,362

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    Plus...

    open lots of hyperlinks at once...
    is probably part of your problem. Don't open them all at once. Open one at a time, check, close it, move to next hyperlink and repeat...

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    4th September 2012
    Posts
    4

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    You're right, using IE is much simpler, and your code didn't cause the cataclysmic death spiral for my computer that the other one did. Is there a way, though, to just open hyperlinks in the active selection rather than in the whole sheet that is open?

    Excel Video Tutorials / Excel Dashboards Reports


  7. #7
    Join Date
    1st September 2010
    Posts
    10,362

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    Change
    Code:
    ActiveSheet.Hyperlinks...
    to
    Code:
    Selection.Hyperlink...
    Last edited by cytop; September 5th, 2012 at 05:21.

    Excel Video Tutorials / Excel Dashboards Reports


  8. #8
    Join Date
    4th September 2012
    Posts
    4

    Re: Open Hyperlinks Automatically in Excel into Google Chrome

    No, that's great, was able to do that minor edit myself... This has really helped, I'm very grateful, thank you very much...!

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Excel VBA to open Chrome and refresh page
    By wxdonar in forum EXCEL HELP
    Replies: 3
    Last Post: June 26th, 2012, 18:42
  2. Automatically open a excel file.
    By abhijeet in forum EXCEL HELP
    Replies: 5
    Last Post: April 30th, 2011, 22:35
  3. Google Chrome. New Web Browser
    By Dave Hawley in forum HAV-A-CHAT
    Replies: 9
    Last Post: September 3rd, 2008, 09:15

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
  •  
porno