Istiyak Member Jun 3, 2012 #1 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
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
Hui Excel Ninja Staff member Jun 3, 2012 #2 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]
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]
Istiyak Member Jun 3, 2012 #3 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
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
Hui Excel Ninja Staff member Jun 3, 2012 #4 Yes You have to code the subroutine to allow for that You can use the Target.Address which will have the Hyperlinks address
Yes You have to code the subroutine to allow for that You can use the Target.Address which will have the Hyperlinks address