Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
follow hyperlink syntax | Excel Discussion (Misc queries) | |||
hyperlink will not follow when worksheet changes name | Excel Discussion (Misc queries) | |||
Getting a hyperlink to follow a sort | Excel Discussion (Misc queries) | |||
follow hyperlink? | New Users to Excel | |||
follow hyperlink? | Excel Worksheet Functions |