Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to Same-Workbook Cell in Excel 2

Status
Not open for further replies.

SaintAugustine

Technical User
Aug 29, 2001
53
US
I'm making a Table of Contents for a workbook. I'd like the ToC to be interactive. Is there a way I can turn each entry in the Table of Contents into a hyperlink that will take the user to the appropriate worksheet?

I know this can be done with VBA, but writing a macro for each tab and linking it to a button next to each ToC entry seems like a drag.

I guess I could make one big macro of if thens...

Any ideas?
 
I'm not sure if this is what you're looking for but...

In xl2k
Insert>Hyperlink Select 'Place In This Document' and select the place. I've never done this before but I would suggest using named ranges as your targets.

;-) If a man says something and there are no women there to hear him, is he still wrong?
"...Three Lions On A Shirt..."
 
Hi SA,

To test out one possibility, I created an example file where the user would do the following...

a) On the Index page, place the cursor on the cell containing the Page number, and

b) Hold down the <Control> key and hit &quot;G&quot;

This will take the user to whatever page number the cursor happens to be placed on.

Here's the routine. This will require you to assign a range name to each of the pages. In this routine, the naming convention is &quot;Page1&quot;, &quot;Page2&quot;, etc.

Sub Go_Page()
pgnum = Trim(Str(ActiveCell.Value))
Page = &quot;Page&quot; & pgnum
Range(Page).Name = &quot;current&quot;
Application.Goto Reference:=&quot;current&quot;
ActiveCell.Offset(0, 0).Select
End Sub

I hope this is worthy of consideration. :)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Loomah, this is perfect. I feel like a goob for not seeing this before =) Thanks!

Dale, your method is also what I was looking for, but it adds a few more keystrokes than I wanted (I should have specified that, since this spreadsheet is going outside the company, the KISS rule applies).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top