Open each hyperlink in new IE tab

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
I'm using this to loop through cells containing hyperlinks to websites and if criteria is met open that page;

Code:
Application.DisplayAlerts = FalseFor Each Cell In Sheet11.Range("J2:J19")
If Cell.Value = "YES" Then
If Cell.Offset(0, 3) > 13 Then
ThisWorkbook.FollowHyperlink Cell.Offset(0, -7)
Cell.Offset(0, 2).Value = Format(Now, "dd/mm/yyyy")
End If
End If
Next
Application.DisplayAlerts = True

This works, but it opens each hyperlink in the same window, so the result is that I only get left the last page it has opened.

Is there a way I can get it to open each link up in a new window/tab?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
First, make sure that you check/select 'A new tab in the current window' under...

Code:
Internet Options >> Tabs >> Tabbed Browsing Settings >> Open links from other programs in

Then set the argument for NewWindow in FollowHyperlink to True...

Code:
ThisWorkbook.FollowHyperlink Address:=Cell.Offset(0, -7), NewWindow:=True

Hope this helps!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,665
Members
449,114
Latest member
aides

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