View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default hyperlink to another workbook and a specific sheet

I set up a hyperlink that would manually open a workbook and go to a
specific worksheet and cell.

Using your code worked fine for me.

You can examine your hyperlink with code

Sub TestHyperlink()
Dim sStr As String
With Range("C11").Hyperlinks(1)
sStr = "Address: " & .Address & vbNewLine & _
"SubAddress: " & .SubAddress
End With
MsgBox sStr
End Sub


If you don't get a subaddress, then there is your problem.


--
Regards,
Tom Ogilvy


"Daniel" wrote in message
...
Thanks for your response.
Can you, please, be a little more explicit?
my code :
Range("C11").Hyperlinks(1).follow points only to the workbook
Daniel
"Tom Ogilvy" a écrit dans le message de news:
...
Use the subaddress as well.

--
Regards,
Tom Ogilvy

"Daniel" wrote in message
...
Hello all.
Is it possible to use VBA to point to another workbook AND a specific

sheet
?
There is no problem when the link is used manually. When using VBA, the

link
is only pointing to the "address" part of the link, so you cannot reach

the
sheet and cell you wanted.
Thanks in advance.
Daniel