Activating Hyperlinks via VBA

5th4x4

New Member
Joined
Mar 31, 2009
Messages
3
I have a column full of hyperlinks that I want to activate using vba (click-click-click right down the column, which opens IE tabs), but I cannot seem to find the method that will activate the hyperlink instead of just the cell.
I've tried some SendKey attempts, but still no luck.

Any ideas as to how this is done within vba ?<!-- google_ad_section_end -->
 
Two similar questions on this topic?
Using this code
URL = Range("H2").Text
Shell "C:\Program Files\Internet Explorer\iexplore.exe " & URL, vbNormalNoFocus



  1. Can it open multiple tabs rather than individual opens of Excel?
  2. Can you specify a range (like H2:h12 rather than just H2) so that it will “loop” through several rows in one column?

I used this but it's quite slow with more than a few, i needed a proper solution as well but this does work:

Sub Hyperlink()
Shell "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe " & Range("B2").Text
Shell "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe " & Range("B3").Text
End Sub
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
You've hit the same issue I have, opening multiple occurrences. That's why I was hopeful opening tabs would be faster. We've all built these URL's in a column (mine for Stockcharts.com) and I want to be able to loop through them using VBA rather than selecting each cell/stock separately. It appears excel doesn’t truly built a URL if you concatenate a string together even though you can click on a cell containing a built address and it works.

Thank you for the quick reply. I appreciate it!
 
Upvote 0
You've hit the same issue I have, opening multiple occurrences. That's why I was hopeful opening tabs would be faster. We've all built these URL's in a column (mine for Stockcharts.com) and I want to be able to loop through them using VBA rather than selecting each cell/stock separately. It appears excel doesn’t truly built a URL if you concatenate a string together even though you can click on a cell containing a built address and it works.

Thank you for the quick reply. I appreciate it!
Try
Code:
For Each Item In Range("H2:H3")
Shell "explorer.exe " & Range(Item.Address).text
Next
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top