Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Excel 2003 Finding External Workbook links using VBA

All,

I have the following code that will find specific text in workbooks.

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

This code works fine for finding specific text in excel workbooks.
However when I try to modify the code to find external links (IE "["
or formulas "=") it doesn't find these characters.

Any ideas on how to find workbooks that use External links?

Any help on this would be appreciated

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
Workbook with external links shows REF! error in 2007 not in 2003 Jeremy Excel Discussion (Misc queries) 0 March 8th 10 03:33 PM
Excel: Finding external "links" in a spreasheet CILeader Excel Discussion (Misc queries) 3 October 15th 05 06:02 PM
Excel 2003: Temporarily "turning off" links to external files... Birmangirl Excel Discussion (Misc queries) 1 August 19th 05 02:51 PM
External Links on open and Excel 2003 Guardian Excel Discussion (Misc queries) 3 June 16th 05 12:25 AM
Finding External File Links No Name Excel Programming 1 September 9th 04 02:42 PM


All times are GMT +1. The time now is 10:40 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"