Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
J J is offline
external usenet poster
 
Posts: 3
Default help creating new hyperlinks programmatically

I'm using a macro to create new hyperlinks from URLs extracted from cells in
another column (see macro below).

Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
HL.Range.Offset(0, 1).Value = HL.Address
Next


The new hyperlinks are only text fields, however, since the address being
copied from each existing hyperlink cell is saved as the value of the
corresponding new cell. How do I copy the address of each existing cell to
the address of the new cell to create a real, clickable hyperlink?

Thx,

J

  #2   Report Post  
Posted to microsoft.public.excel.links
external usenet poster
 
Posts: 473
Default help creating new hyperlinks programmatically

Sorry, but I am probably being dense.

If I understand you correctly, if you have a hyperlink in A2 you want
to create a hyperlink in A3 which, when clicked will take you to A2 ?

Sub Test()
Dim HL As Hyperlink
For Each HL In ActiveSheet.Hyperlinks
ActiveSheet.Hyperlinks.Add HL.Range.Offset(0, 1), "", _
HL.Range.Address
Next
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup

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
Creating hyperlinks Fred Excel Discussion (Misc queries) 0 February 21st 07 04:13 PM
Self creating Hyperlinks HELP PLS Paul Excel Discussion (Misc queries) 3 February 6th 07 11:33 AM
creating hyperlinks to email crossroads Excel Discussion (Misc queries) 0 November 8th 06 03:28 AM
creating hyperlinks Archana Jain Excel Worksheet Functions 1 November 14th 05 05:56 AM
creating and moving hyperlinks - Please help!!!! hssmith Excel Worksheet Functions 0 September 16th 05 07:46 PM


All times are GMT +1. The time now is 05:50 AM.

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

About Us

"It's about Microsoft Excel"