Dim myWB as workbook
myWB = activeworkbook 'this the master workbook where from you run this macro and collect the data
myFolder = "C:\myfiles\"
myFile = Dir(myFolder & "*.csv")
Do While myFile <> ""
Workbooks.Open Filename:=myFolder & myFile
call myMacro 'call the macros here
'the following copy the cells, determine the last cell used in your master file and paste
Range("W3:AF3").Select
Selection.Copy
myWB.Activate
Range("a1048576").Select
Selection.End(xlUp).Select
ActiveSheet.Paste
workbooks(myFile).activate
Application.CutCopyMode = False
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
myFile = Dir()
Loop
Bookmarks