Hyperlink to run a Program

  • Thread starter Thread starter Gordon
  • Start date Start date
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top