Tech Support Forum banner
Status
Not open for further replies.
1 - 4 of 4 Posts

·
Registered
Joined
·
3 Posts
Discussion Starter · #1 ·
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
 

·
Registered
Joined
·
160 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
 

·
Registered
Joined
·
3 Posts
Discussion Starter · #3 ·
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
 

·
Registered
Joined
·
160 Posts
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