aesoton
Marine/Ocean
- Sep 25, 2002
- 42
How can I write a macro that hyperlinks all the cells in a range to sheets that are named after these cells (kind of like an index page).
This is the code that I have generated.
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'2C'!A1", TextToDisplay:="2C"
So I can create a link to a page if I know the name. What I have done is created a process that creates a new page from this specified codes i.e 1C 2C or 3C or whatever. But how I edit the line so that it will automatically take the code and link to the sheet without me having to specify the name in the coding?
Does this make sense
Please Help
Andrew299
This is the code that I have generated.
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'2C'!A1", TextToDisplay:="2C"
So I can create a link to a page if I know the name. What I have done is created a process that creates a new page from this specified codes i.e 1C 2C or 3C or whatever. But how I edit the line so that it will automatically take the code and link to the sheet without me having to specify the name in the coding?
Does this make sense
Please Help
Andrew299