Below I summarize what I would like to do through a macro with OOo basic:
1. The files will be stored in a directory, a several Origin files and only one Destination file.
I imagine that for convenience the macro could be executed in the same directory where the files are located, no matter what. As the following vba lines:
Code: Select all
Folder = ActiveWorkbook.Path & "\"
nFile = 1
Filename = Dir(Folder & "RVTools_" & "*.xl*")
'...
'More loop to go file by file. With the intention of copying the selected columns of different sheets in workbook from the file originA to the first sheet of destinationA.
'As:
Do while file <> ""
Workbooks.Open
For each sheet in Workbooks(file).Worksheets
allsheets = Workbooks(OriginX).Worksheets.Count
Next file
Workbooks(file).close
File = Dir()
Loop
Code: Select all
Workbooks(File).Worksheets(Sheet.Name).Copy after:=Workbooks(OriginX).Worksheets(allsheets)
3. Copy the contents of some columns of the different sheets of the OriginA, OriginB, OriginC, etc,. workbooks to the Destination file.
OriginA multiple sheets --> Destination Sheet1
OriginB multiple sheets --> Destination Sheet2
.
.
.
OriginN multiple sheets --> Destination SheetN
Thanks again and I hope someone has an idea of how to solve this problem, because I'm lost.