In Excel Ctrl+[ or ] will sometimes directly switch to another sheet to show the precedents or dependents in that sheet.
I want that programmatically, because I want to get the precedents (or dependents) of a selection of cells.
Range.Dependents and Range.Precedents have other issues, but the solution there does not solve the extra-sheet issue.
After a fair bit of Googling I found it was solved in 2003.
But I used the code from here.
The problem is that
DependentsandPrecedentsareRangeproperties, which can’t refer to multiple worksheets.The solution uses
NavigateArrowto locate the cross-sheet ‘dents.Here’s my code: