Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
In my worksheet named "Index" - I have the names of all my worksheets (up to
date) Some names include spaces. I'd like to be able to Double-Click on a name (text) and have that worksheet become active. I've been toying around now for an hour - in google, in help, close, but no cigar... Can you assist? TIA |
#2
![]() |
|||
|
|||
![]()
Check out David McRitchie's BuildTOC macro:
http://www.mvps.org/dmcritchie/excel/buildtoc.htm Alternatively, select the cells with the names and choose Insert/Hyperlink. Click the Document tab and in the Anchor textbox, enter the sheetname!cellreference, with sheet names with spaces in single quotes, e.g.: Sheet2!A1 'Spaces in Title'!A1 NoSpacesNeeded!J10 Click OK Note: Hyperlinks only take a single click to jump to their destination. If you really want to double click, you'll need to use an event macro: Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Excel.Range, Cancel As Boolean) If Target.Column = 1 Then On Error Resume Next Sheets(CStr(Target.Value)).Select Cancel = True On Error GoTo 0 End If End Sub Put that in your worksheet code module (right-click the worksheet tab and choose View Code). Change the column number if you worksheet names aren't in column A. In article <t3Xwd.6677$jn.3778@lakeread06, "Jim May" wrote: In my worksheet named "Index" - I have the names of all my worksheets (up to date) Some names include spaces. I'd like to be able to Double-Click on a name (text) and have that worksheet become active. I've been toying around now for an hour - in google, in help, close, but no cigar... Can you assist? TIA |
#3
![]() |
|||
|
|||
![]()
Thanks JE, the event-macro you offered did the trick.
"JE McGimpsey" wrote in message ... Check out David McRitchie's BuildTOC macro: http://www.mvps.org/dmcritchie/excel/buildtoc.htm Alternatively, select the cells with the names and choose Insert/Hyperlink. Click the Document tab and in the Anchor textbox, enter the sheetname!cellreference, with sheet names with spaces in single quotes, e.g.: Sheet2!A1 'Spaces in Title'!A1 NoSpacesNeeded!J10 Click OK Note: Hyperlinks only take a single click to jump to their destination. If you really want to double click, you'll need to use an event macro: Private Sub Worksheet_BeforeDoubleClick( _ ByVal Target As Excel.Range, Cancel As Boolean) If Target.Column = 1 Then On Error Resume Next Sheets(CStr(Target.Value)).Select Cancel = True On Error GoTo 0 End If End Sub Put that in your worksheet code module (right-click the worksheet tab and choose View Code). Change the column number if you worksheet names aren't in column A. In article <t3Xwd.6677$jn.3778@lakeread06, "Jim May" wrote: In my worksheet named "Index" - I have the names of all my worksheets (up to date) Some names include spaces. I'd like to be able to Double-Click on a name (text) and have that worksheet become active. I've been toying around now for an hour - in google, in help, close, but no cigar... Can you assist? TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
adding an option to the right click menu | Excel Discussion (Misc queries) | |||
Click on X in upper right corner should save FIRST the file you se | Excel Discussion (Misc queries) | |||
how do I create comma and double quote delimited file | Excel Discussion (Misc queries) | |||
Why do my text boxes disappear from my chart when I click out? | Charts and Charting in Excel | |||
Enable Double sided printing contiuously when printing multiple s. | Excel Discussion (Misc queries) |