jump to sheet in adjacent file?

swix

New Member
Joined
Jul 11, 2002
Messages
6
I'm working my challenge out with lots of help from this great forum but am stumped at a point.
My objective is to click on a hyperlink which will use that cell text as reference to a worksheet name in a second target workbook in the same directory and take the user there leaving the source worksheet open.
My current solution:
Code:
   ActiveCell.Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address ="ScriptDetail_One.xls", _
        SubAddress:=ActiveCell & "!A3"
has big drawbacks.

First, the link created records the path which then is invalid when the 2 files are moved around (which they must be able to do). If it could somehow just state "go to this sheet in this file, in the same directory I am in" at runtime that would be ideal.

Second, the source sheet closes, requiring use of he web toolbar "back" button to return.

I'd be grateful for any pointers in the right direction on these issues. Thanks!

Working in Excel v11.1 Mac - for use on all recent version/platforms
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,207,392
Messages
6,078,221
Members
446,323
Latest member
fishezuk

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top