-
This is just a modification of what I showed you in: http://www.vbaexpress.com/forum/showthread.php?p=257028
In the Updates() Sub, you may need to modify it to create unique text file names.
[VBA]Sub DoUpdates()
Dim pFolder As String, fileList As Variant, f As Variant
Dim ws As Worksheet
On Error GoTo TheEnd
SpeedOn
'Set the parent folder of slave workbooks to process.
pFolder = ThisWorkbook.Path & "\" '<-------- Change as needed.
' Open each workbook except thisworkbook and get the data.
fileList = GetFileList(pFolder & "*.xl*")
For Each f In fileList
If ThisWorkbook.Name = f Then GoTo Nextf
'Do your thing from here to Nextf.
Set slaveWB = Workbooks.Open(pFolder & f)
'Add the data from slave to master.
For Each ws In slaveWB.Worksheets
ws.Activate
Updates
Next ws
slaveWB.Close True
Nextf:
Next f
TheEnd:
SpeedOff
End Sub[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules