ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hyperlinking (https://www.excelbanter.com/excel-programming/373707-hyperlinking.html)

Chris

Hyperlinking
 
I can't find out how to hyperlink to a specific sheet in a file, so I am
trying to write some event code, so when a particular cell is selected it
opens the file and selects the correct sheet. Should I be able to do it
through hyperlink or is code the only way?
If code is the only way, can someone help I can't get it to work?

Jim Cone

Hyperlinking
 
'xl2002 object.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)
'xl97 object.Add(Anchor, Address, SubAddress)

Sub MoreTests()
ActiveSheet.Hyperlinks.Add anchor:=ActiveCell, _
Address:="C:\Documents and Settings\user\My Documents\Excel Files\Expenses.xls", _
SubAddress:="Sheet2!B14", ScreenTip:="Click to opens this file", TextToDisplay:="Expense File"
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Chris"
wrote in message
I can't find out how to hyperlink to a specific sheet in a file, so I am
trying to write some event code, so when a particular cell is selected it
opens the file and selects the correct sheet. Should I be able to do it
through hyperlink or is code the only way?
If code is the only way, can someone help I can't get it to work?

Tom Ogilvy

Hyperlinking
 
A hyperlink should be able to do it. When you do Insert=Hyperlink, then
select the file and location in the file you want to go to.

With reference to code, if you want help with code, you should post the code
you are having problems with - at least the relevant portions.

--
Regards,
Tom Ogilvy


"Chris" wrote:

I can't find out how to hyperlink to a specific sheet in a file, so I am
trying to write some event code, so when a particular cell is selected it
opens the file and selects the correct sheet. Should I be able to do it
through hyperlink or is code the only way?
If code is the only way, can someone help I can't get it to work?


Chris

Hyperlinking
 
Thanks, but I managed to figure it out without code. I hadn't tried the
bookmark area of hyperlink

"Tom Ogilvy" wrote:

A hyperlink should be able to do it. When you do Insert=Hyperlink, then
select the file and location in the file you want to go to.

With reference to code, if you want help with code, you should post the code
you are having problems with - at least the relevant portions.

--
Regards,
Tom Ogilvy


"Chris" wrote:

I can't find out how to hyperlink to a specific sheet in a file, so I am
trying to write some event code, so when a particular cell is selected it
opens the file and selects the correct sheet. Should I be able to do it
through hyperlink or is code the only way?
If code is the only way, can someone help I can't get it to work?



All times are GMT +1. The time now is 04:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com