PC Review


Reply
Thread Tools Rate Thread

Clarify this post

 
 
Danny
Guest
Posts: n/a
 
      13th Jun 2008
What I would like this code to do is find when a workbook has an
external link from one workbook to another. Say I have a link from
workbook A to workbook B pullnig in data from a specific range from
workbook B.


Is there away to find that the external link or name range exists in
workbook A using or modifying my code above?
Also, when workbooks are all closed and return the listing and path?

Thanks
D
 
Reply With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      13th Jun 2008
So you want to know if the workbook you are in pulls data from other
workbooks. If so then get the FindLinks download...

http://www.oaltd.co.uk/MVP/

If you are wanting to know if other workbook(s) are pulling data from the
workbook you are in then the answer is, there is no easy way to determine
that.

I personally never link workbooks as I have never had them work out for me

--
HTH...

Jim Thomlinson


"Danny" wrote:

> What I would like this code to do is find when a workbook has an
> external link from one workbook to another. Say I have a link from
> workbook A to workbook B pullnig in data from a specific range from
> workbook B.
>
>
> Is there away to find that the external link or name range exists in
> workbook A using or modifying my code above?
> Also, when workbooks are all closed and return the listing and path?
>
> Thanks
> D
>

 
Reply With Quote
 
Danny
Guest
Posts: n/a
 
      13th Jun 2008
On Jun 13, 9:45*am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com> wrote:
> So you want to know if the workbook you are in pulls data from other
> workbooks. If so then get the FindLinks download...
>
> http://www.oaltd.co.uk/MVP/
>
> If you are wanting to know if other workbook(s) are pulling data from the
> workbook you are in then the answer is, there is no easy way to determine
> that.
>
> I personally never link workbooks as I have never had them work out for me
>
> --
> HTH...
>
> Jim Thomlinson
>
>
>
> "Danny" wrote:
> > What I would like this code to do is find when a workbook has an
> > external link from one workbook to another. *Say I have a link from
> > workbook A to workbook B pullnig in data from a specific range from
> > workbook B.

>
> > Is there away to find that the external link or name range exists in
> > workbook A using or modifying my code above?
> > Also, when workbooks are all closed and return the listing and path?

>
> > Thanks
> > D- Hide quoted text -

>
> - Show quoted text -


Thanks for the link I will check it out. I appreciate your help.
 
Reply With Quote
 
Danny
Guest
Posts: n/a
 
      17th Jun 2008
On Jun 13, 9:45*am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com> wrote:
> So you want to know if the workbook you are in pulls data from other
> workbooks. If so then get the FindLinks download...
>
> http://www.oaltd.co.uk/MVP/
>
> If you are wanting to know if other workbook(s) are pulling data from the
> workbook you are in then the answer is, there is no easy way to determine
> that.
>
> I personally never link workbooks as I have never had them work out for me
>
> --
> HTH...
>
> Jim Thomlinson
>
>
>
> "Danny" wrote:
> > What I would like this code to do is find when a workbook has an
> > external link from one workbook to another. *Say I have a link from
> > workbook A to workbook B pullnig in data from a specific range from
> > workbook B.

>
> > Is there away to find that the external link or name range exists in
> > workbook A using or modifying my code above?
> > Also, when workbooks are all closed and return the listing and path?

>
> > Thanks
> > D- Hide quoted text -

>
> - Show quoted text -


Thanks for the link but I wanted to know how to code this versus
adding an addin. I appreciate your help. The code I currently have
is below. But I can't get it to find formulas or external links.

Sub findfiles()
With Application.FileSearch


.NewSearch
.LookIn = "H:\1 corey projects\vbatest"
.SearchSubFolders = True
'Cells.Find(What:="[").Activate
', After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
' xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
' , SearchFormat:=False).Activate
.TextOrProperty = "["
.LookIn = xlFormulas
.MatchTextExactly = False
.FileType = msoFileTypeExcelWorkbooks
.Filename = "*.xls"
.Execute
If .Execute(msoSortByFileName) > 0 Then
If .Execute(msoSortOrderDescending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & " file(s) found."
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = .FoundFiles(i)
'Cells(i, 2).Value = FileDateTime(.FoundFiles(i))
'Cells(i, 3).Value = FileLen(.FoundFiles(i))
Next i
Else
MsgBox "There were no files found."
End If

For i = 1 To .FoundFiles.Count
'MsgBox "Files found: " & .FoundFiles.Count& " file(s)
found."
MsgBox "There were " & .FoundFiles.Count & " file(s) found."

'UserForm1.ListBox1.AddItem.
'UserForm1.ListBox1.AddItem.FoundFiles (i)
Next i

'UserForm1.Show

End If
End With
End Sub
Any help on getting this code to work for external links and
identifying errors in formulas would be greatly appreciated. Thanks
Jim

D
 
Reply With Quote
 
Danny
Guest
Posts: n/a
 
      17th Jun 2008
On Jun 13, 9:45*am, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com> wrote:
> So you want to know if the workbook you are in pulls data from other
> workbooks. If so then get the FindLinks download...
>
> http://www.oaltd.co.uk/MVP/
>
> If you are wanting to know if other workbook(s) are pulling data from the
> workbook you are in then the answer is, there is no easy way to determine
> that.
>
> I personally never link workbooks as I have never had them work out for me
>
> --
> HTH...
>
> Jim Thomlinson
>
>
>
> "Danny" wrote:
> > What I would like this code to do is find when a workbook has an
> > external link from one workbook to another. *Say I have a link from
> > workbook A to workbook B pullnig in data from a specific range from
> > workbook B.

>
> > Is there away to find that the external link or name range exists in
> > workbook A using or modifying my code above?
> > Also, when workbooks are all closed and return the listing and path?

>
> > Thanks
> > D- Hide quoted text -

>
> - Show quoted text


I appreciate your help on this but I was hoping to learn how I would
code the macro to do this versus using an Excel addin. My code I
currently have is below. Any suggestions on modifying this code to
find external links and also errors in formulas?
Sub findfiles()
With Application.FileSearch


.NewSearch
.LookIn = "C:\"
.SearchSubFolders = True
.TextOrProperty = "Budget" 'Here is where I
replace "budget" with "=" or "[" (see note below)
.LookIn = xlFormulas
.MatchTextExactly = False
.FileType = msoFileTypeExcelWorkbooks
.Filename = "*.xls"
.Execute
If .Execute(msoSortByFileName) > 0 Then
If .Execute(msoSortOrderDescending) > 0 Then
MsgBox "There were " & .FoundFiles.Count & " file(s) found."
For i = 1 To .FoundFiles.Count
Cells(i, 1).Value = .FoundFiles(i)
Next i
Else
MsgBox "There were no files found."
End If


For i = 1 To .FoundFiles.Count
'MsgBox "Files found: " & .FoundFiles.Count& " file(s)
found."
MsgBox "There were " & .FoundFiles.Count & " file(s) found."


Next i


End If
End With
End Sub



Thanks
D
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Just Want To Clarify Before I Try This... =?Utf-8?B?TGl6?= Windows XP Help 6 16th Nov 2007 10:56 PM
need to clarify =?Utf-8?B?Sm9obiBTYXd5ZXI=?= Microsoft Excel Charting 0 18th Jul 2005 02:05 PM
clarify Microsoft Excel Programming 0 13th Aug 2004 09:49 PM
Clarify HAL - XP Cameron Microsoft Windows 2000 Active Directory 1 11th Jun 2004 06:52 PM
Pls clarify Gopal Prabhakaran Microsoft C# .NET 11 12th Feb 2004 06:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 AM.