linking to a spreadhseet

M

Mostro

how can I make a cell to where if you click in it it takes you to a
different tab?

Lets say sheet is a list of states, and by clicking on the cell that
contains texas you are taken to the sheet labeled texas. Is that possible?
 
C

CLR

Left-click on your "Texas" cell, then do INsert > Hyperlink > and follow the
menus, using the "Named location in file" window.......

Vaya con Dios,
Chuck, CABGx3
 
J

jkend69315

Here's one way to do it. Say your state name will be in cell A1. Open
the workbook and click Alt-F11. If the Project Explorer isn't shown,
click View on the menubar, then Project Explorer. From the list,
select the sheet that contains the state name. Click Insert from the
menu, then Module. Paste this code in the sheet's module. If the
state name isn't necessarily one one cell, but might be anywhere in,
say, column A, you could check for the active cell being in column A by
using a line like If ActiveCell.Column=1 instead of checking for the
cell address.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim ShtName As String
If ActiveCell.Address = "$A$1" Then
On Error GoTo SelectError
ShtName = ActiveCell
ThisWorkbook.Worksheets(ShtName).Activate
End If
Exit Sub
SelectError:
MsgBox "Sheet '" & ActiveCell & "' is not found."
End Sub
 
C

CLR

You're welcome.......and don't feel bad....it's been said, "One who asks a
question is a fool for five minutes, while one who needs to and doesn't, is a
fool forever".........

Vaya con Dios,
Chuck, CABGx3
 
Top