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!

Anyone good in Excel?

Status
Not open for further replies.

abaseballfan

Technical User
Feb 20, 2004
53
US
Hi, I have an excel spreadsheet I made about a year ago our company uses for bidding jobs and so on, and it has about ten tabs at the bottom which is what my question is, does anyone know how on one of the excel sheets I can create shortcut links to all these tabs? where I can click on that link or cell in the sheet and it would take me to one of my ten work sheets? I seen this done before where on one worksheet they had about 20 cells and you could click one cell and that would take you to the sheet you selected, but have no idea how to do this and I know nothing about macros or anything like that so I'm lost, thanks for your time.

Lance
 
You can simply assign a hyperlink to each worksheet in your document. Right click in a cell and select hyperlink. Then under link to, select Place in this document. Then select one of the sheets.
 
Hi

Try this.

First insert a new worksheet and rename it "Start".

Use the Excel menu to Tools, Macro, Visual Basic Editor.

Use the VBA menu to Insert a Module and then copy the following code into the module.

Code:
Sub SetTabLinks()
    Dim X As Integer
    Dim MyName As String
    Dim MyLink As String

    Sheets("Start").Select
    For X = 1 To Worksheets.Count
        MyName = Worksheets(X).Name
        MyLink = MyName & "!A1"
        ActiveSheet.Hyperlinks.Add Anchor:=Cells(X, 1), Address:="", SubAddress:=MyLink, TextToDisplay:=MyName
    Next
    Application.MacroOptions Macro:="GoHome", Description:="", ShortcutKey:="h"
End Sub

Sub GoHome()
    Sheets("Start").Select
End Sub

Running the macro SetTabLinks creates a series of hyperlinks to the worksheets. The macro GoHome, which is initiated by using the keys "Ctrl-h" will take you back to the Start sheet.

You may also wish to make the macro SetTabLinks to run automatically as soon as the workbook opens. To do this, in the VBA editor, double click on the title "ThisWorkbook" in the Project window. You should then have the word Workbook showing in the left hand dropdown in the Editor window. Use the right hand drop down to select "Open" and then type in the macro name of SetTabLinks inside the macro header and end. It should look like this:

Code:
Private Sub Workbook_Open()
  SetTabLinks
End Sub

Hope that this helps.

Paul
 
Molby's suggestions is what's going to work best for you abaseballfan. It's very simple.

Please let us know if it worked or not.

google.gif
juggle.gif

 
that worked great, I just did the hyperlink to keep it simple since I'm not very good with excel, but thanks a lot everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top