Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default OPENING SEVERAL HYPERLINKS

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default OPENING SEVERAL HYPERLINKS

If hyperlinks were inserted using the HYPERLINK() function, then this may help:

Sub hypperrr()
'
' gsnuxx
'
Set ru = ActiveSheet.UsedRange
Set rf = ru.SpecialCells(xlCellTypeFormulas)

For Each r In rf
s = r.Formula
lk = r.Value
If InStr(s, "=HYPERLINK(") Then
ActiveWorkbook.FollowHyperlink Address:=lk
End If
Next
End Sub

--
Gary''s Student - gsnu200798


"Santi" wrote:

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default OPENING SEVERAL HYPERLINKS

Gary,

Thank you for all your help, but I get the message below when I try that
macro. Do you know why?

Run-time error2147221014 (800401 EA):

Cannot open the specified file



"Gary''s Student" wrote:

If hyperlinks were inserted using the HYPERLINK() function, then this may help:

Sub hypperrr()
'
' gsnuxx
'
Set ru = ActiveSheet.UsedRange
Set rf = ru.SpecialCells(xlCellTypeFormulas)

For Each r In rf
s = r.Formula
lk = r.Value
If InStr(s, "=HYPERLINK(") Then
ActiveWorkbook.FollowHyperlink Address:=lk
End If
Next
End Sub

--
Gary''s Student - gsnu200798


"Santi" wrote:

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default OPENING SEVERAL HYPERLINKS

It means the system is having trouble openning one or more of the links.

Are all the "visible" links clickable manually??
--
Gary''s Student - gsnu200798


"Santi" wrote:

Gary,

Thank you for all your help, but I get the message below when I try that
macro. Do you know why?

Run-time error2147221014 (800401 EA):

Cannot open the specified file



"Gary''s Student" wrote:

If hyperlinks were inserted using the HYPERLINK() function, then this may help:

Sub hypperrr()
'
' gsnuxx
'
Set ru = ActiveSheet.UsedRange
Set rf = ru.SpecialCells(xlCellTypeFormulas)

For Each r In rf
s = r.Formula
lk = r.Value
If InStr(s, "=HYPERLINK(") Then
ActiveWorkbook.FollowHyperlink Address:=lk
End If
Next
End Sub

--
Gary''s Student - gsnu200798


"Santi" wrote:

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default OPENING SEVERAL HYPERLINKS

yes the original links work, I get this error when I enter the formula
"hyperlink" on a different worksheet.

"Gary''s Student" wrote:

It means the system is having trouble openning one or more of the links.

Are all the "visible" links clickable manually??
--
Gary''s Student - gsnu200798


"Santi" wrote:

Gary,

Thank you for all your help, but I get the message below when I try that
macro. Do you know why?

Run-time error2147221014 (800401 EA):

Cannot open the specified file



"Gary''s Student" wrote:

If hyperlinks were inserted using the HYPERLINK() function, then this may help:

Sub hypperrr()
'
' gsnuxx
'
Set ru = ActiveSheet.UsedRange
Set rf = ru.SpecialCells(xlCellTypeFormulas)

For Each r In rf
s = r.Formula
lk = r.Value
If InStr(s, "=HYPERLINK(") Then
ActiveWorkbook.FollowHyperlink Address:=lk
End If
Next
End Sub

--
Gary''s Student - gsnu200798


"Santi" wrote:

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default OPENING SEVERAL HYPERLINKS

This is my problem and not yours.

In the old post (the one about Inserted Hyperlinks), the VBA could easily
find the underlying URL and Follow it.

In this post (looking for the HYPERLINK function), the macro uses what you
see in the cell as the URL. This is O.K. for cells like:

=HYPERLINK("http://www.cnn.com")

But it fails for cells like:

=HYPERLINK("http://www.cnn.com","news")

because "news" is not a URL.

This means that my macro will not work on all hyperlinks. Sorry.
--
Gary''s Student - gsnu200798


"Santi" wrote:

yes the original links work, I get this error when I enter the formula
"hyperlink" on a different worksheet.

"Gary''s Student" wrote:

It means the system is having trouble openning one or more of the links.

Are all the "visible" links clickable manually??
--
Gary''s Student - gsnu200798


"Santi" wrote:

Gary,

Thank you for all your help, but I get the message below when I try that
macro. Do you know why?

Run-time error2147221014 (800401 EA):

Cannot open the specified file



"Gary''s Student" wrote:

If hyperlinks were inserted using the HYPERLINK() function, then this may help:

Sub hypperrr()
'
' gsnuxx
'
Set ru = ActiveSheet.UsedRange
Set rf = ru.SpecialCells(xlCellTypeFormulas)

For Each r In rf
s = r.Formula
lk = r.Value
If InStr(s, "=HYPERLINK(") Then
ActiveWorkbook.FollowHyperlink Address:=lk
End If
Next
End Sub

--
Gary''s Student - gsnu200798


"Santi" wrote:

In an excel worksheet how can I open several hyperlinks at once without
having to click on each one? Taking into account that the hyperlinks are a
result of a Vlookup formula. Can anyone help? I tried the macro listed
below which works but only when the hyperlink is not part of a formula.


Sub hypper()
Dim h As Hyperlink
For Each h In ActiveSheet.Hyperlinks
h.Follow
Next
End Sub


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OPENING HYPERLINKS IN EXCEL Santi[_2_] Excel Discussion (Misc queries) 2 August 5th 08 04:17 PM
Help opening pictures from hyperlinks BC From KY Excel Discussion (Misc queries) 0 February 11th 08 02:19 AM
Opening Hyperlinks Nicki Excel Programming 1 September 19th 07 06:40 PM
Hyperlinks opening in a new window. Dan H Setting up and Configuration of Excel 1 April 13th 07 12:13 AM
Opening hyperlinks with macro?? Frazer Excel Discussion (Misc queries) 12 August 17th 05 04:21 PM


All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"