ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hyperlinks (https://www.excelbanter.com/excel-programming/432380-hyperlinks.html)

Doug

Hyperlinks
 
How can I select all the hyperlinks within a particular range by clicking on
a single cell? I am hoping to do this for the purpose of opening up several
web page tabs at once?
--


michdenis

Hyperlinks
 
Hi Doug,

Here an example :

Place this code in the module of your sheet
'---------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Lk As Hyperlink

'If you select A1
If Not Intersect(Target, Range("A1")) Is Nothing Then
'for all hyperlink in this range
For Each Lk In Range("C:C").Hyperlinks
'open hperlink in same window
Lk.Follow False
Next
End If
End Sub
'---------------------------------------



"Doug" a écrit dans le message de groupe de discussion :
...
How can I select all the hyperlinks within a particular range by clicking on
a single cell? I am hoping to do this for the purpose of opening up several
web page tabs at once?
--


Doug

Hyperlinks
 
Thank You very much
--
Have a great day!


"MichDenis" wrote:

Hi Doug,

Here an example :

Place this code in the module of your sheet
'---------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Lk As Hyperlink

'If you select A1
If Not Intersect(Target, Range("A1")) Is Nothing Then
'for all hyperlink in this range
For Each Lk In Range("C:C").Hyperlinks
'open hperlink in same window
Lk.Follow False
Next
End If
End Sub
'---------------------------------------



"Doug" a écrit dans le message de groupe de discussion :
...
How can I select all the hyperlinks within a particular range by clicking on
a single cell? I am hoping to do this for the purpose of opening up several
web page tabs at once?
--




All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com