Loop through a list of excel files searching & adding a list of file dependencies (Links) in adjacent columns??

morph81

New Member
Joined
Apr 17, 2011
Messages
12
Hi All

I have been looking online for sny good strating points for writing a macro which will:

1. Run through a list of files in Excel (full file path)

2. Open and search out all links used within the file (rather than using the edit links tool manually)

3. Inputting/Listing all files which are linked in the adjacent columns

----

4. (Think this element wouldn't be possible??) List any files which are be dependent on the file opened...

ANY IDEAS much appreciate!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Richard

Many many thanks for such a swift response - I think the code you posted in this previous thread should do the trick nicely.

Great!

Cheers

M
 
Upvote 0
Hi Richard

I think the code I lifted from your previous thread is pre 2007, so the application.filesearch no longer works....

I did a serach for workaround code :

Code:
--------------------------------------------------------------------------------------' Module : Module1
' DateTime : 09/05/2007 08:43
' Author : Roy Cox (royUK)' Website : [URL="http://www.excel-it.com"]www.excel-it.com[/URL] for more examples and Excel Consulting
' Purpose : Open all worksheets in a specific folder' Disclaimer; This code is offered as is with no guarantees. You may use it in your' projects but please leave this header intact.
'---------------------------------------------------------------------------------------
Option Explicit
Sub Open_All_Files()
Dim oWbk As Workbook
Dim sFil As String
Dim sPath As String
sPath = "C:\Documents and Settings\Roy Cox\My Documents\" 'location of files
ChDir sPath
sFil = Dir("*.xlsx") 'change or add formats
Do While sFil <> "" 'will start LOOP until all files in folder sPath have been looped through Set oWbk = Workbooks.Open(sPath & "\" & sFil) 'opens the file
' do something
oWbk.Close True 'close the workbook, saving changes
sFil = Dir
Loop ' End of LOOP
End

But am not sure how to insert this/modify your original code and I don't think it (workaround filesearch code) will loop through all subfolders...

Thanks for everything so far,

Cheers

Martha
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,813
Members
452,945
Latest member
Bib195

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top