PDA

View Full Version : Hyperlinks to many Sheets within a Workbook



hardeep
06-20-2009, 05:03 AM
Hi! Experts

I have Workbook which have 98 Sheets include a Sheet1!"UNIQUE LIST" Which have Names of the Sheets.

Now i want to insert Hyperlinks in the Sheet1!"UNIQUE LIST" to other Sheets.

Ex:

If i Click on A2(CZ001) it take me to Sheet!CZ001 . If i click on A78(WZ009) it take me to Sheet!WZ009 and so on.

I knew how to insert the Hyperlinks but i want any Formula or Code that will do me with in a Mintues.

MY Second Question is:

Say i Click on CZ001 it take me to Sheet!CZ001 and When i click on A1 of Sheet!CZ001 it take me to Sheet1!"UNIQUE LIST"

If i Click on WZ009 in Sheet1!"UNIQUE LIST" it take to me Sheet!WZ009, when i Click on A1 of Sheet!WZ009 it take me to Sheet!"UNIQUE LIST"

Is this Possible

Thanks in Advance

Hardeep Kanwar

lucas
06-20-2009, 12:49 PM
http://www.vbaexpress.com/kb/getarticle.php?kb_id=16

http://www.vbaexpress.com/kb/getarticle.php?kb_id=120

Simon Lloyd
06-20-2009, 01:14 PM
This should do what you need:
Sub Hyperlinks_Addition()
Dim i As Long
Dim Sh As Worksheet
For i = 1 To Sheets.Count
With ActiveSheet
'add hyperlink to list
If Sheets(i).Name = ActiveSheet.Name Then GoTo Nxt:
.Hyperlinks.Add Anchor:=.Range("A" & Rows.Count).End(xlUp) _
.Offset(1, 0), Address:="", SubAddress:=Sheets(i).Name & "!A1", _
TextToDisplay:=Sheets(i).Name
'add hyperlink to sheets
Sheets(i).Hyperlinks.Add Anchor:=Sheets(i).Range("A1"), _
Address:="", SubAddress:=.Name & "!A1", _
TextToDisplay:=ActiveSheet.Name
End With
Nxt:
Next
End Sub

Aussiebear
06-20-2009, 09:11 PM
Hi hardeep,

If you decide to follow Lucas's advice and use the code available from the 1st KB entry, make sure you insert it into a module, then select the list of sheets before running the macro. It works well.

hardeep
06-20-2009, 10:29 PM
Thanks to All

But i am looking Without a Code or Macro

Is There any Formula.

Simon Lloyd
06-21-2009, 12:38 AM
Thanks to All

But i am looking Without a Code or Macro

Is There any Formula.You will have to do it all manually, using the toolbar INSERT>HYPERLINKS and do each sheet manually, however run my code once and its all done for you!

hardeep
06-21-2009, 12:45 AM
You will have to do it all manually, using the toolbar INSERT>HYPERLINKS and do each sheet manually, however run my code once and its all done for you!

THANKS TO ALL:beerchug:

Aussiebear
06-21-2009, 12:54 AM
Do you have Excel help installed with the version you are using hardeep?

hardeep
06-21-2009, 12:55 AM
Do you have Excel help installed with the version you are using hardeep?


I can't Understand You Sir,

could you Pls Explain me what you are trying to ask from Me.

Aussiebear
06-21-2009, 01:55 AM
I am at a loss to understand why you would come to a VBA forum but not want either a VBA or Macro answer to an issue which is readily available if you use the help section of your version of Excel.