#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Hyperlink

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Hyperlink

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Hyperlink

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Hyperlink

Try the corrected version

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


"Boss" wrote:

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Hyperlink


Thanks a lot... That worked perfectly..

How can i remove the TextToDisplay, if i wish to keep it as blank...

thx!


"Jacob Skaria" wrote:

Try the corrected version

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


"Boss" wrote:

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Hyperlink

If text to display is set as blank as below; the full reference will be visible

TextToDisplay:=""

So if we keep a blank space ( as below) a underscore will be visible.

TextToDisplay:=" "


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


"Boss" wrote:

Thanks a lot... That worked perfectly..

How can i remove the TextToDisplay, if i wish to keep it as blank...

thx!


"Jacob Skaria" wrote:

Try the corrected version

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


"Boss" wrote:

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default Hyperlink


You helped me a lot... thx!

"Jacob Skaria" wrote:

If text to display is set as blank as below; the full reference will be visible

TextToDisplay:=""

So if we keep a blank space ( as below) a underscore will be visible.

TextToDisplay:=" "


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


"Boss" wrote:

Thanks a lot... That worked perfectly..

How can i remove the TextToDisplay, if i wish to keep it as blank...

thx!


"Jacob Skaria" wrote:

Try the corrected version

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


"Boss" wrote:

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Hyperlink


Cheers!

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


"Boss" wrote:

You helped me a lot... thx!

"Jacob Skaria" wrote:

If text to display is set as blank as below; the full reference will be visible

TextToDisplay:=""

So if we keep a blank space ( as below) a underscore will be visible.

TextToDisplay:=" "


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


"Boss" wrote:

Thanks a lot... That worked perfectly..

How can i remove the TextToDisplay, if i wish to keep it as blank...

thx!


"Jacob Skaria" wrote:

Try the corrected version

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


"Boss" wrote:

This does not work...

I need to click on A1 and it should open the corresponding worksheet in the
same file. thx!

Example:
A1.value = "test" then it should open the worsheet test

thx!



"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

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
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... dollardoc Excel Programming 1 April 7th 05 12:47 AM
reading html when hyperlink address not hyperlink text diplayed Kevin Excel Programming 1 December 4th 03 10:13 PM


All times are GMT +1. The time now is 04:40 PM.

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"