Follow a hyperlink

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to follow this hyperlink using vba...
=IF(A21="","",HYPERLINK("http://www.imdb.com/find?q="&SUBSTITUTE(A21,"
","%20"),"About "& "'" & A21 & "'")).

I've tried using '.Hyperlinks(1).Follow NewWindow:=True' but it's a formula
so I think thats whats giving me the trouble.

Thanks in Advance
 
James

Correct. The HYPERLINK formula doesn't create a Hyperlink object. I think
you'll have to "rebuild" the formula in VBA, but it shouldn't be too hard.
In what context are you doing this? Is the prefix "imdb.com" always the
same? Is it always for A21, or for other cells as well? How does your code
know it's A21 - is it an argument to the sub or are you using an event?
 
I need to have this formula in my worksheet becuase when a user enters in
the information into column A it will give a hyperlink to search a webpage.
I would like the user to have this function available in the worksheet and
also through my vba procedure.

I guess I'll just have to write the formula in my code as well. Thought
there might have been an easier way. Thanks though, anyone please post if
otherwise.
 
Back
Top