Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-13-2023, 04:04 AM
p45cal's Avatar
p45cal p45cal is offline How to go to Nth precedents of active cell? Windows 10 How to go to Nth precedents of active cell? Office 2021
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

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 View Post
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
Reply With Quote
 

Tags
prcedent



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to go to Nth precedents of active cell? access active cell in word vba littlepeaks Word VBA 5 08-24-2022 09:14 PM
Move active cell down Marcia Excel Programming 2 06-22-2022 04:10 PM
How to go to Nth precedents of active cell? Change active cell after running macro in active cell via selection change Peterson Excel Programming 3 03-07-2021 12:19 PM
Cell equal value new value of active cell which is a drop down hassanmoukadem Excel Programming 1 04-13-2020 07:54 PM
How to go to Nth precedents of active cell? Clear all cell colors within a range starting at cell A8 and change row of active cell to yellow FUGMAN Excel Programming 7 02-05-2017 08:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft