This should do it (no need for the other lines):
Code:
Sub gotopresedence()
Application.Goto Reference:=ActiveCell.DirectPrecedents.Areas(InputBox("what precedence"))
End Sub
It's the
Areas part that was missing.
re:
Quote:
Originally Posted by soroush.kalantari
As far as I know, there is no way to write a code that does this job for precedents which are out of the sheet the active cell lies
|
Have an explore of the likes of:
Code:
With ActiveCell
.ShowPrecedents
.NavigateArrow TowardPrecedent:=True, ArrowNumber:=1, LinkNumber:=1
.Parent.ClearArrows
End With