Hyperlink to run a Program

G

Gordon

I am right clicking on a cell, click Hyperlink, enter in address:
Application.Run"ProgramName"

Also tried:
ActiveSheet.Hyperlink.Add:=Selection.Application.Run"ProgranName.

I would like the program to enter the hyperlink addres into the cell.

Thanking you in advance,

Gordon
 
G

Gary''s Student

Here is a neat trick:

As you know, you can set a hyperlink to go to a specific cell. You can also
create a selection change macro for that cell that can call a general macro.
Here is an example:

In A1 put a hyperlink to cell Z100
In WorkSheet code put:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("Z100")) Is Nothing Then
Exit Sub
End If
Call hello
End Sub


In a standard module put:

Sub hello()
MsgBox ("hello")
End Sub
 
Top