Tech Support Forum banner

Click excel hyperlink with vba

28744 Views 3 Replies 2 Participants Last post by  David M58
I have a excel hyperlink that is generated by code and i want to be able to click the link with vba or a macro and follow it. I have tried recording a macro but it follows to a specific cell and as the hyperlink address keeps changing this doesn't work

thanks
rslc
Status
Not open for further replies.
1 - 4 of 4 Posts
For example, if cell A1 contains one hyperlink that points to http://www.google.com/, you can then launch Google in your browser with this statement:

Range("A1").Hyperlinks(1).Follow
Thanks for the reply but the link i want to click points to an excel cell on another worksheet that i want to go to and using your code results in hi-lighted error in vba code module
You may find it necessary to specify additional qualifiers, such as the worksheet name in this line:
Worksheets("Sheet1").Range("A1").Hyperlinks(1).Follow
This may take some experimentation with the Follow method of the Hyperlink object.
1 - 4 of 4 Posts
Status
Not open for further replies.
Top