Thread: Hyperlink
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Hyperlink


Correction to the previous post

Sub Macro1()
Dim lngRow As Long, lngLastRow As Long
Dim myRange As Range
lngLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For lngRow = 1 To lngLastRow
Set myRange = Range("A" & lngRow)
ActiveSheet.Hyperlinks.Add Anchor:=myRange, Address:="", SubAddress:= _
myRange.Text & "!A1", TextToDisplay:=myRange.Text
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Try the below macro in summary sheet..

Sub Macro()
Dim lngRow As Long, lngLastRow As Long
lngLastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
For lngRow = 1 To lngLastRow
ActiveSheet.Hyperlinks.Add Range("A" & lngRow), Range("A" & lngRow)
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Boss" wrote:

I have ten sheets and a summary sheet.

In the column A of summary sheet i have all the other sheets names.

i need a code which will automatically link all the sheets as hyperlink to
the summary sheet.

Any help would be appreciatd.
thx!
Boss