Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Hyperlink to execute macro.

Hi
you can use the worksheet_followhyperlink event to achieve this. E.g.
put the following code in your worksheet module
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$A$1" Then
'insert your code here
End If
End Sub

The above will process your code if the hyperlink in cell A1 is
invoked.

HTH
Frank

Kevgrn114 wrote:
How do I make a hyperlink that will run a specified macro when
clicked?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Hyperlink to execute macro.

I got it I got it

I was trying to put the code in the general Modules and not in the code on the specific sheet

Thank you for the help.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Hyperlink to execute macro.

kevgrn114 wrote:
I got it I got it!

I was trying to put the code in the general Modules and not in the
code on the specific sheet.

Thank you for the help.


Hi
good to hear
Frank
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink - execute a "Back/Previous" type of functionality A C Excel Discussion (Misc queries) 0 June 20th 05 10:59 PM
Execute Macro automatically after hyperlink Bill Elerding Excel Discussion (Misc queries) 13 May 5th 05 01:01 AM
Execute Macro Yves Excel Discussion (Misc queries) 3 April 23rd 05 04:26 PM
How do I execute command from button or hyperlink? rerhart Excel Discussion (Misc queries) 1 February 18th 05 09:41 PM
button to execute macro R. Holland Excel Programming 4 October 8th 03 12:43 AM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"