• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Assign Macro to Hyperlink

Istiyak

Member
Today i m working with macro and i acknowledged that i need to assign a macro to the hyperlink.


After so many research i m zero......


Plz help me.


Waiting.


Regards

Istiyak
 
Istiyak

Why use a Hyperlink at all?

Why not set the text in the cell to be Blue and Underlined.

Then link the cell to a Worksheet_SelectionChange event and what ever code you need


or


You can use some VBA in a Worksheet_FollowHyperlink event

[pre]
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Run ("My_Macro")
End Sub
[/pre]
 
Hey Hui..


Thnx for your great techniq....?


I have used it working great.


Bt still is it possible if more than one hyperlink available in same sheet.


many thanks


Regards

Istiyak
 
Yes


You have to code the subroutine to allow for that


You can use the Target.Address which will have the Hyperlinks address
 
Back
Top