Snabelhund
New Member
- Joined
- Nov 11, 2021
- Messages
- 20
- Office Version
- 2016
- Platform
- Windows
Hi!
i would need some help with a macro that combines several workbooks into one master workbook. Also the macro should be movable between computers (will need to run it on several different computers) so preferably written as an add-in, but any solution that is "portable " will work really.
So i´ve started to write a piece but im stuck so id appreciate some help. tried seraching both the forum and the web but i cant really find a good solution for this
Basically what ive tried is to write some code where the user can select the location for the source files (the files that are going to be consolidated into one workbook) using the Application.FileDialog(msoFileDialogFolderPicker) But i´m struggling with the rest, I guess that i should loop through all the workboks in the selected folder but i´m struggling with the code.
So to clarify what i want to achieve is:
1. let the user select a location/folder with workbooks to combine/consolidate. (for clarification these are called source workbooks)
2. copy all the "source workbooks into one workbook.
All the data in the source workbooks is stored in the first sheet and thet workbooks all have the same layout/structure
Really greatful for some help!
Cheers
/N
i would need some help with a macro that combines several workbooks into one master workbook. Also the macro should be movable between computers (will need to run it on several different computers) so preferably written as an add-in, but any solution that is "portable " will work really.
So i´ve started to write a piece but im stuck so id appreciate some help. tried seraching both the forum and the web but i cant really find a good solution for this
Basically what ive tried is to write some code where the user can select the location for the source files (the files that are going to be consolidated into one workbook) using the Application.FileDialog(msoFileDialogFolderPicker) But i´m struggling with the rest, I guess that i should loop through all the workboks in the selected folder but i´m struggling with the code.
So to clarify what i want to achieve is:
1. let the user select a location/folder with workbooks to combine/consolidate. (for clarification these are called source workbooks)
2. copy all the "source workbooks into one workbook.
All the data in the source workbooks is stored in the first sheet and thet workbooks all have the same layout/structure
Really greatful for some help!
Cheers
/N