djgenesis13
New Member
- Joined
- Apr 24, 2014
- Messages
- 22
Hello Everybody,
I need your help guys.
I am trying to find hyperlinks in a column and open them in my default browser.
I am currently using this:
This works great BTW if you want to open ALL links in the range you set even if there are blank cells.
My problem is that in this range there are multiple links from various domains.
I want a VBA script that will search a range and open the hyperlinks that start with "http://www.example.com" and NOT ALL the links from that range.
Thanks alot guys.
Vasilis
I need your help guys.
I am trying to find hyperlinks in a column and open them in my default browser.
I am currently using this:
Code:
Sub openlink1()
'Open Links
Dim Sh As Worksheet
Dim Rng As Range
Dim Cell As Range
On Error Resume Next
Set Sh = Worksheets("New")
With Sh
Set Rng = .Range("g2:g50" & .Cells(.Rows.Count, "g").End(xlUp).Row)
End With
For Each Cell In Rng
ThisWorkbook.FollowHyperlink Cell.Value, NewWindow:=True
Next Cell
End Sub
This works great BTW if you want to open ALL links in the range you set even if there are blank cells.
My problem is that in this range there are multiple links from various domains.
I want a VBA script that will search a range and open the hyperlinks that start with "http://www.example.com" and NOT ALL the links from that range.
Thanks alot guys.
Vasilis