View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default ThisWorkbook.FollowHyperlink to Location in Workbook

Different and worse, I would say. I think you get more options with Goto
that would make that a better choice. I can think of one situation where
FollowHyperlink would be better: If you are building the string dynamically
and sometimes it points inside the workbook, sometimes to another workbook,
and sometimes to another program. In that case you could use one method to
do it all and just build the appropriate string. Beyond that, I'd go with
Goto.

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

Doug Glancy wrote:
I obviously missed the boat on this one - and I'm curious, is this
different, or better than, Application.Goto?

Thanks,

Doug

"Dick Kusleika" wrote in message
...
James

ThisWorkbook.FollowHyperlink "#Sheet1!A3"

Not very intuitive, but that's what works.

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


James Cox wrote:
I can get the following to work in a VBA sub:

ThisWorkbook.FollowHyperlink
Address:="http://example.microsoft.com"

but get an error when I try to specify a location in the workbook
with:

ThisWorkbook.FollowHyperlink Address:="", SubAddress:="Sheet1!A3"

It seemed that would be the proper format for the address in the
open workbook, but I'm picking up an error - "Run time error 5 -
Invalid procedure call or argument"

What am I missing or doing wrong here? I really need to do this
programatically and not have to define a "fixed" hyperlink on the
worksheet (or anywhere else).

Thanks in advance for any help you can give!

James