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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Hyperlink/Cell Click to activate a worksheet

Status
Not open for further replies.

jmcg

Technical User
Jun 30, 2000
223
GB
I am trying to activate a worksheet when a cell is clicked. I have used a hyperlink but this does not seem to activate the worksheet as I have a worksheet_activate macro which does not run.
If I click on the worksheet the macro does run.
Any suggestions for cell clicking or to make the hyperlink activate the worksheet?
 
I found a way of doing it

First go to your target worksheet, highlight all cells and then create a named range for the cells on that worksheet. (i.e. menu items insert/name/define).. call it whatever you want

in the cell you want to act as the activating cell on the other worksheet create a hyperlink, choose nothing as the file location and in the 'named location in file' box type in the name you defined above

Not ideal but does work

Andy
 
Andy
I tried this and it does not seem to "Activate" the worksheet as the macro does not run.
Thanks for the suggestion, anything else much appreciated.
 
How about this then as a macro in your source worksheet

Andy

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If ActiveCell.Address = "$A$4" Then ' replace address with the cell you are interested in
Sheets("Sheet2").Select'replace sheet name with the target sheet
Else
'do nothing
End If
End Sub
 
Andy
Excellent thanks ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top