View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Hyperlink to a Macro

First have the hyperlink point to a cell. When the jump is made to the cell,
use an Event to trigger the macro:

In A1 enter:

=HYPERLINK("#sheet1!Z100","leap")

and in worksheet code have something like:

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

REMEMBER: worksheet code, not a standard module.
--
Gary''s Student - gsnu200735


"pokdbz" wrote:

Can you make a Hyperlink so when you click it runs a macro?