Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook with external links shows REF! error in 2007 not in 2003 | Excel Discussion (Misc queries) | |||
Excel: Finding external "links" in a spreasheet | Excel Discussion (Misc queries) | |||
Excel 2003: Temporarily "turning off" links to external files... | Excel Discussion (Misc queries) | |||
External Links on open and Excel 2003 | Excel Discussion (Misc queries) | |||
Finding External File Links | Excel Programming |