Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default hyperlink to another workbook and a specific sheet

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default hyperlink to another workbook and a specific sheet

Try naming the sheet and range in the Hyperlink's SubAddress.

Mike F
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlink to another workbook and a specific sheet

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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default hyperlink to another workbook and a specific sheet

Thanks for your answer, it works fine.
Daniel
"Mike" a écrit dans le message de news:
...
Try naming the sheet and range in the Hyperlink's SubAddress.

Mike F
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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default hyperlink to another workbook and a specific sheet

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








  #6   Report Post  
Posted to microsoft.public.excel.programming
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








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default hyperlink to another workbook and a specific sheet

Yes, you get the address and subaddress correctly. The problem is that the
"follow" method seems not to use the subaddress property, as long as it is
refered with sheet and cell name (Feuil1!A2 for instance).
Daniel
"Tom Ogilvy" a écrit dans le message de news:
...
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










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlink to another workbook and a specific sheet

Like I said, it worked for me in xl2003.

If you can't get it to work, then perhaps you would need to use the
followhyperlink event to achieve the desired result.
--
Regards,
Tom Ogilvy


"Daniel" wrote in message
...
Yes, you get the address and subaddress correctly. The problem is that the
"follow" method seems not to use the subaddress property, as long as it is
refered with sheet and cell name (Feuil1!A2 for instance).
Daniel
"Tom Ogilvy" a écrit dans le message de news:
...
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












  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default hyperlink to another workbook and a specific sheet

Thanks for all.
Daniel
"Tom Ogilvy" a écrit dans le message de news:
...
Like I said, it worked for me in xl2003.

If you can't get it to work, then perhaps you would need to use the
followhyperlink event to achieve the desired result.
--
Regards,
Tom Ogilvy


"Daniel" wrote in message
...
Yes, you get the address and subaddress correctly. The problem is that
the
"follow" method seems not to use the subaddress property, as long as it
is
refered with sheet and cell name (Feuil1!A2 for instance).
Daniel
"Tom Ogilvy" a écrit dans le message de news:
...
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














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
Hyperlink to a specific worksheet in another workbook Romileyrunner1 Excel Worksheet Functions 5 November 11th 09 03:31 AM
Hyperlink to a specific worksheet in another workbook. Romileyrunner1 Excel Worksheet Functions 2 November 10th 09 05:26 PM
External hyperlink to a specific page in a workbook Nimbus55 Excel Worksheet Functions 2 July 31st 06 01:07 PM
Hyperlink to specific sheet; workbook saved as html Bawn Excel Worksheet Functions 0 January 5th 05 01:31 PM
hyperlink to specific sheet in excel mango Excel Worksheet Functions 1 December 9th 04 11:17 AM


All times are GMT +1. The time now is 12:13 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"