Good Afternoon,
I'm working on a macro to activate a named worksheet when a cell with the corresponding name on a separate worksheet is double-clicked on. I tried to use a macro suggested in another thread but it doesn't seem to work. For reference I am working in the O365 desktop version of Excel.
Ex. Cell Value A3 is "Paella", double click on the cell to pull up the Worksheet named "Paella"
The column to be double clicked on in a Worksheet called "Table of Contents", and the range in question would be A1:A100.
Here's the code I attempted to use with no effect:
Any help is greatly appreciated.
Thanks!
I'm working on a macro to activate a named worksheet when a cell with the corresponding name on a separate worksheet is double-clicked on. I tried to use a macro suggested in another thread but it doesn't seem to work. For reference I am working in the O365 desktop version of Excel.
Ex. Cell Value A3 is "Paella", double click on the cell to pull up the Worksheet named "Paella"
The column to be double clicked on in a Worksheet called "Table of Contents", and the range in question would be A1:A100.
Here's the code I attempted to use with no effect:
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal target As Range, Cancel As Boolean)
Application.EnableEvents = True
If Intersect(target, Range("A:A")) Is Nothing Then Exit Sub
v = target.Value
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = v Then
Cancel = True
ws.Activate
End If
Next
End Sub
Any help is greatly appreciated.
Thanks!