VBA programmers deals with macros now and then, and to run the marco by clicking hyperlink should catch the event of clicking of the hyperlink.
The event which does this is
Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
As this belongs to the WorkSheet, it should go into the Worksheet
1. Right click and hyperlink the text you want to hyperlink.
2. Select the developer tab and open up visual basic, or you can do Alt + F11
3. In the folder “Microsoft Excel Objects” there is a list of the sheets contained within the workbook. Select the sheet that contains the hyperlink.
4. Paste the following code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) 'Write your code here End Sub
No comments:
Post a Comment