Clarify this post

  • Thread starter Thread starter Danny
  • Start date Start date
D

Danny

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
 
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
 
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







- Show quoted text -

Thanks for the link I will check it out. I appreciate your help.
 
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







- 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
 
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







- 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top