HYPERLINK that points to same cell and runs macro?

jmpatrick

Active Member
Joined
Aug 17, 2016
Messages
477
Office Version
  1. 365
Platform
  1. Windows
Good morning! I'm working on a formula that will create a hyperlink that points to the same cell in which it resides. Here's what I have:

Excel Formula:
=HYPERLINK("#Calendar!C7",AS7)

Calendar is the Sheet name, C7 is the cell the formula is in, and AS7 is the cell that provides the "friendly name."

In the Sheet's code is this:

VBA Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

    If Target.Range.Column = 3 Then Call OpenSearchEditFill
        
End Sub

I'm not getting an error, but Call OpenSearchEditFill isn't firing.

jp
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Also tried this:

Excel Formula:
=HYPERLINK(GZ7 & " - " &  "Calendar!C7",AS7)

...with this in GZ7:

Excel Formula:
file:///\\GLC-SERVER\Test\Test.xlsm

That throws a "can't open specified file" error.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,976
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top