Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Precedents Property

I am trying to use the following code to get a list of all
the precedents of cell A1 on Sheet1:

Sub sbGetPrecedents()
Worksheets("Sheet1").Activate
MsgBox Range("A1").Precedents.Address
End Sub

It seems to create a list of all the precedents that are
on Sheet1, but it does not include the precedents that are
on other worksheets. Does anybody have a suggestion how I
can get these as well??? TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Precedents Property

What you found is all you can get with the Precedents property.

The only way I know of finding off-sheet precedents (or dependents), is
to mimic the GUI capability. If you turn on the macro recorder and use
the Audting Toolbar to find and follow precedents, you will see how to
do it in code. This is one of those few instances when you must
activate the worksheets involved in the analysis.

--
Regards,

Tushar Mehta
MS MVP Excel 2000-2003
www.tushar-mehta.com
Excel, PowerPoint, and VBA tutorials and add-ins
Custom Productivity Solutions leveraging MS Office


In article ,
says...
I am trying to use the following code to get a list of all
the precedents of cell A1 on Sheet1:

Sub sbGetPrecedents()
Worksheets("Sheet1").Activate
MsgBox Range("A1").Precedents.Address
End Sub

It seems to create a list of all the precedents that are
on Sheet1, but it does not include the precedents that are
on other worksheets. Does anybody have a suggestion how I
can get these as well??? TIA

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
tracing precedents Ricardo Monroy Excel Worksheet Functions 1 July 28th 08 06:27 PM
Precedents Abdul Shakeel Excel Discussion (Misc queries) 3 July 25th 08 08:08 PM
Exact Precedents Abdul Shakeel Excel Worksheet Functions 8 July 23rd 08 04:55 AM
Excel Precedents Joshua Bright Excel Discussion (Misc queries) 1 July 28th 05 06:22 PM
Trace Precedents Hawk Excel Programming 2 November 8th 03 01:55 AM


All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"