Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Follow a hyperlink

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Follow a hyperlink

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?


--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

James W. wrote:
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Follow a hyperlink

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.

"Dick Kusleika" wrote:

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?


--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

James W. wrote:
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
follow hyperlink syntax david s. Excel Discussion (Misc queries) 0 August 23rd 08 06:06 PM
hyperlink will not follow when worksheet changes name Jackson Excel Discussion (Misc queries) 4 August 28th 07 07:32 PM
Getting a hyperlink to follow a sort Andybanker Excel Discussion (Misc queries) 7 June 26th 06 07:39 PM
follow hyperlink? JethroUK© New Users to Excel 0 April 5th 06 09:55 PM
follow hyperlink? JethroUK© Excel Worksheet Functions 0 April 5th 06 09:55 PM


All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"